diff --git a/lua/avante/llm_tools/create.lua b/lua/avante/llm_tools/create.lua index 7ad274d..8e4e0e5 100644 --- a/lua/avante/llm_tools/create.lua +++ b/lua/avante/llm_tools/create.lua @@ -10,6 +10,8 @@ M.name = "create" M.description = "The create tool allows you to create a new file with specified content." +function M.enabled() return require("avante.config").behaviour.enable_claude_text_editor_tool_mode end + ---@type AvanteLLMToolParam M.param = { type = "table", diff --git a/lua/avante/llm_tools/insert.lua b/lua/avante/llm_tools/insert.lua index 2080009..45af507 100644 --- a/lua/avante/llm_tools/insert.lua +++ b/lua/avante/llm_tools/insert.lua @@ -10,6 +10,8 @@ M.name = "insert" M.description = "The insert tool allows you to insert text at a specific location in a file." +function M.enabled() return require("avante.config").behaviour.enable_claude_text_editor_tool_mode end + ---@type AvanteLLMToolParam M.param = { type = "table", diff --git a/lua/avante/llm_tools/str_replace.lua b/lua/avante/llm_tools/str_replace.lua index 5c3f336..f029b71 100644 --- a/lua/avante/llm_tools/str_replace.lua +++ b/lua/avante/llm_tools/str_replace.lua @@ -12,6 +12,8 @@ M.name = "str_replace" M.description = "The str_replace tool allows you to replace a specific string in a file with a new string. This is used for making precise edits." +function M.enabled() return require("avante.config").behaviour.enable_claude_text_editor_tool_mode end + ---@type AvanteLLMToolParam M.param = { type = "table", diff --git a/lua/avante/llm_tools/undo_edit.lua b/lua/avante/llm_tools/undo_edit.lua index cbcbb47..1502ebb 100644 --- a/lua/avante/llm_tools/undo_edit.lua +++ b/lua/avante/llm_tools/undo_edit.lua @@ -10,6 +10,8 @@ M.name = "undo_edit" M.description = "The undo_edit tool allows you to revert the last edit made to a file." +function M.enabled() return require("avante.config").behaviour.enable_claude_text_editor_tool_mode end + ---@type AvanteLLMToolParam M.param = { type = "table",