Skip to content

Commit

Permalink
fix: ensure paths are recreated after calling :AvanteClear to avoid e…
Browse files Browse the repository at this point in the history
…rrors (yetone#678)
  • Loading branch information
ddillert authored Oct 5, 2024
1 parent 0705234 commit c3848d0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lua/avante/path.lua
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,9 @@ P.available = function() return templates ~= nil end
P.clear = function()
P.cache_path:rm({ recursive = true })
P.history_path:rm({ recursive = true })

if not P.cache_path:exists() then P.cache_path:mkdir({ parents = true }) end
if not P.history_path:exists() then P.history_path:mkdir({ parents = true }) end
end

return P

0 comments on commit c3848d0

Please sign in to comment.