parent
cb09c749fa
commit
b6f7c193b0
@ -85,6 +85,7 @@ Prompt.get = function(bufnr)
|
|||||||
local scanner = Scan.scan_dir(directory:absolute(), { depth = 1, add_dirs = true })
|
local scanner = Scan.scan_dir(directory:absolute(), { depth = 1, add_dirs = true })
|
||||||
for _, entry in ipairs(scanner) do
|
for _, entry in ipairs(scanner) do
|
||||||
local file = Path:new(entry)
|
local file = Path:new(entry)
|
||||||
|
if file:is_file() then
|
||||||
if entry:find("planning") and Prompt.templates.planning == nil then
|
if entry:find("planning") and Prompt.templates.planning == nil then
|
||||||
Prompt.templates.planning = file:read()
|
Prompt.templates.planning = file:read()
|
||||||
elseif entry:find("editing") and Prompt.templates.editing == nil then
|
elseif entry:find("editing") and Prompt.templates.editing == nil then
|
||||||
@ -93,6 +94,7 @@ Prompt.get = function(bufnr)
|
|||||||
Prompt.templates.suggesting = file:read()
|
Prompt.templates.suggesting = file:read()
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
Path:new(debug.getinfo(1).source:match("@?(.*/)"):gsub("/lua/avante/path.lua$", "") .. "templates")
|
Path:new(debug.getinfo(1).source:match("@?(.*/)"):gsub("/lua/avante/path.lua$", "") .. "templates")
|
||||||
:copy({ destination = cache_prompt_dir, recursive = true })
|
:copy({ destination = cache_prompt_dir, recursive = true })
|
||||||
|
Loading…
x
Reference in New Issue
Block a user