@@ -37,9 +37,12 @@ local native_term_tip_shown = false
37
37
-- Uses the `terminal_cmd` from the module's configuration, or defaults to "claude".
38
38
-- @local
39
39
-- @return string The command to execute.
40
- local function get_claude_command ()
40
+ local function get_claude_command (model )
41
41
local cmd_from_config = term_module_config .terminal_cmd
42
42
if not cmd_from_config or cmd_from_config == " " then
43
+ if model ~= nil then
44
+ return " claude " .. model -- Default if not configured
45
+ end
43
46
return " claude" -- Default if not configured
44
47
end
45
48
return cmd_from_config
332
335
-- @local
333
336
-- @return string|nil cmd_string The command string, or nil on failure.
334
337
-- @return table|nil env_table The environment variables table, or nil on failure.
335
- local function get_claude_command_and_env ()
336
- local cmd_string = get_claude_command ()
338
+ local function get_claude_command_and_env (model )
339
+ local cmd_string = get_claude_command (model )
337
340
if not cmd_string or cmd_string == " " then
338
341
vim .notify (" Claude terminal base command cannot be determined." , vim .log .levels .ERROR )
339
342
return nil , nil
@@ -387,10 +390,10 @@ end
387
390
388
391
--- Opens or focuses the Claude terminal.
389
392
-- @param opts_override table (optional) Overrides for terminal appearance (split_side, split_width_percentage).
390
- function M .open (opts_override )
393
+ function M .open (opts_override , model )
391
394
local provider = get_effective_terminal_provider ()
392
395
local effective_config = build_effective_term_config (opts_override )
393
- local cmd_string , claude_env_table = get_claude_command_and_env ()
396
+ local cmd_string , claude_env_table = get_claude_command_and_env (model )
394
397
395
398
if not cmd_string then
396
399
-- Error already notified by the helper function
@@ -460,10 +463,10 @@ end
460
463
461
464
--- Toggles the Claude terminal open or closed.
462
465
-- @param opts_override table (optional) Overrides for terminal appearance (split_side, split_width_percentage).
463
- function M .toggle (opts_override )
466
+ function M .toggle (opts_override , model )
464
467
local provider = get_effective_terminal_provider ()
465
468
local effective_config = build_effective_term_config (opts_override )
466
- local cmd_string , claude_env_table = get_claude_command_and_env ()
469
+ local cmd_string , claude_env_table = get_claude_command_and_env (model )
467
470
468
471
if not cmd_string then
469
472
return -- Error already notified
0 commit comments