File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -999,15 +999,18 @@ function ChatHandler:chat_finder()
999999 end
10001000 -- add custom action to delete chat files
10011001 actions [" ctrl-d" ] = {
1002- fn = function (selected )
1002+ fn = function (selected , opts )
10031003 local filename = filename_from_selection (selected )
10041004 if vim .fn .confirm (" Are you sure you want to delete " .. filename .. " ?" , " &Yes\n &No" , 2 ) == 1 then
10051005 futils .delete_file (self .options .chat_dir .. " /" .. filename , self .options .chat_dir )
10061006 logger .info (filename .. " deleted" )
1007+ -- Return true to reload the picker after deletion
1008+ return true
10071009 end
1010+ -- Return false if deletion was cancelled
1011+ return false
10081012 end ,
1009- -- TODO: Fix bug, currently not possible --
1010- reload = false ,
1013+ reload = true ,
10111014 }
10121015
10131016 if self .options .toggle_target == " popup" then
@@ -1025,9 +1028,6 @@ function ChatHandler:chat_finder()
10251028 prompt = " Chat selection ❯" ,
10261029 fzf_opts = self .options .fzf_lua_opts ,
10271030 previewer = " builtin" ,
1028- fn_transform = function (x )
1029- return require (" fzf-lua" ).make_entry .file (x , { file_icons = true , color_icons = true })
1030- end ,
10311031 actions = actions ,
10321032 })
10331033 return
You can’t perform that action at this time.
0 commit comments