dpayne / CodeGPT.nvim

CodeGPT is a plugin for neovim that provides commands to interact with ChatGPT.
GNU General Public License v3.0
764 stars 50 forks source link

Call `run_finished_hook` on error situations. #40

Closed zzhirong closed 1 year ago

zzhirong commented 1 year ago

The function run_finished_hook is not currently called when errors occur. This can result in the creation of states in the on_started_hook function that cannot be cleaned up after the request ends, regardless of its success. Therefore, it is necessary to add the run_finished_hook function to the error handling path.

dpayne commented 1 year ago

looks good, thanks!