Skip to content

Commit 09dc879

Browse files
committed
Fix ChatToggle not create new chat
1 parent 949bca5 commit 09dc879

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lua/gp/init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ M.cmd.ChatToggle = function(params, system_prompt, agent)
808808
if params.range ~= 2 then
809809
-- check if last.md chat file exists and open it
810810
local last = M.config.chat_dir .. "/last.md"
811-
if vim.fn.filereadable(last) == 1 then
811+
if vim.fn.filereadable(vim.fn.resolve(last)) == 1 and last ~= vim.fn.resolve(last) then
812812
-- resolve symlink
813813
last = vim.fn.resolve(last)
814814
M.open_buf(last, M.resolve_buf_target(params), M._toggle_kind.chat, true)

0 commit comments

Comments
 (0)