fix: claude-text-editor dont change the mod for other providers (#1656)

This commit is contained in:
Omar Crespo
2025-03-20 21:30:44 -05:00
committed by GitHub
parent 3a96c1f9c7
commit d1fa11ec41

View File

@@ -2469,7 +2469,14 @@ function Sidebar:create_input_container(opts)
local mode = "planning"
if Config.behaviour.enable_cursor_planning_mode then mode = "cursor-planning" end
if Config.behaviour.enable_claude_text_editor_tool_mode then mode = "claude-text-editor-tool" end
local provider_config = Config.get_provider_config(Config.provider)
local is_claude_model = provider_config
and provider_config.model
and (provider_config.model:lower():match("claude") or Config.provider:lower():match("claude"))
if Config.behaviour.enable_claude_text_editor_tool_mode and is_claude_model then
mode = "claude-text-editor-tool"
end
---@type AvanteGeneratePromptsOptions
local prompts_opts = {