feat(cmd): AvanteClear
(#518)
Remove all cache/history path. Co-authored-by: Aaron Pham <Aaronpham0103@gmail.com>
This commit is contained in:
parent
e55f9f753f
commit
a4a037cec1
@ -67,6 +67,7 @@ H.commands = function()
|
|||||||
return vim.tbl_filter(function(key) return key:find(prefix, 1, true) == 1 end, Config.providers)
|
return vim.tbl_filter(function(key) return key:find(prefix, 1, true) == 1 end, Config.providers)
|
||||||
end,
|
end,
|
||||||
})
|
})
|
||||||
|
cmd("Clear", function() require("avante.path").clear() end, { desc = "avante: clear all chat history" })
|
||||||
end
|
end
|
||||||
|
|
||||||
H.keymaps = function()
|
H.keymaps = function()
|
||||||
|
@ -143,6 +143,9 @@ end
|
|||||||
|
|
||||||
P.available = function() return templates ~= nil end
|
P.available = function() return templates ~= nil end
|
||||||
|
|
||||||
P.clear = function() P.cache_path:rm({ recursive = true }) end
|
P.clear = function()
|
||||||
|
P.cache_path:rm({ recursive = true })
|
||||||
|
P.history_path:rm({ recursive = true })
|
||||||
|
end
|
||||||
|
|
||||||
return P
|
return P
|
||||||
|
Loading…
x
Reference in New Issue
Block a user