Instead of implementing synchronous call to a command line utility via vim.uv.spawn() switch to using vim.system(). Its return value (object) wait() method allows to specify timeout too. This makes code much simpler.
embed_extra
llm_extra