feat: beast mode for gpt4.1 (#2431)

This commit is contained in:
yetone
2025-07-10 12:30:06 +08:00
committed by GitHub
parent 1748b9120a
commit 8942e12798
4 changed files with 128 additions and 5 deletions

View File

@@ -291,11 +291,13 @@ function Prompt.get_templates_dir(project_root)
find_rules(Config.rules.global_dir)
find_rules(directory:absolute())
local source_dir =
Path:new(debug.getinfo(1).source:match("@?(.*/)"):gsub("/lua/avante/path.lua$", "") .. "templates")
-- Copy built-in templates to cache directory (only if not overridden by user templates)
Path:new(debug.getinfo(1).source:match("@?(.*/)"):gsub("/lua/avante/path.lua$", "") .. "templates"):copy({
source_dir:copy({
destination = cache_prompt_dir,
recursive = true,
override = false,
override = true,
})
vim.iter(Prompt.custom_prompts_contents):filter(function(_, v) return v ~= nil end):each(function(k, v)