Skip to content

Commit

Permalink
Fix ChatToggle not create new chat
Browse files Browse the repository at this point in the history
  • Loading branch information
ziboh committed Aug 3, 2024
1 parent 949bca5 commit 743029b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lua/gp/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ M.cmd.ChatToggle = function(params, system_prompt, agent)
if params.range ~= 2 then
-- check if last.md chat file exists and open it
local last = M.config.chat_dir .. "/last.md"
if vim.fn.filereadable(last) == 1 then
if vim.fn.filereadable(last) == 1 and last ~= vim.fn.resolve(last) then
-- resolve symlink
last = vim.fn.resolve(last)
M.open_buf(last, M.resolve_buf_target(params), M._toggle_kind.chat, true)
Expand Down

0 comments on commit 743029b

Please sign in to comment.