initial change to tools logic

This commit is contained in:
2025-01-31 09:49:15 +01:00
parent 59540981ed
commit fd8df2abd5
9 changed files with 484 additions and 420 deletions

View File

@@ -40,7 +40,6 @@ function M.load()
initial_prompt = "",
directories = { "." },
default_prompt_blocks = {},
-- Changed default from 128000 to 16384 as requested
prompt_char_limit = 300000,
project_name = "",
debug = false,
@@ -50,9 +49,15 @@ function M.load()
partial_acceptance = false,
improved_debug = false,
enable_chunking = false,
-- New default for step-by-step
enable_step_by_step = true,
enable_debug_commands = false
enable_debug_commands = false,
-- New table for tool auto-accept configuration
tool_auto_accept = {
readFile = false,
editFile = false,
executeCommand = false,
}
}
if fd then
@@ -98,13 +103,21 @@ function M.load()
if type(result.enable_chunking) == "boolean" then
config.enable_chunking = result.enable_chunking
end
-- Added logic to load enable_step_by_step from user config
if type(result.enable_step_by_step) == "boolean" then
config.enable_step_by_step = result.enable_step_by_step
end
if type(result.enable_debug_commands) == "boolean" then
config.enable_debug_commands = result.enable_debug_commands
end
-- Load tool_auto_accept if present
if type(result.tool_auto_accept) == "table" then
for k, v in pairs(result.tool_auto_accept) do
if config.tool_auto_accept[k] ~= nil and type(v) == "boolean" then
config.tool_auto_accept[k] = v
end
end
end
end
end
else