aicommits
aicommits copied to clipboard
fix: Update cli to exit with force-0 on completion
without terminal "hangs" after selecting "NO" on a generated commit
Based on the code, this shouldn't be necessary. I can only imagine it happening if a dependency has left some async/open handles (e.g. clack).
Do you know how I can reproduce it? What OS?
Sure, @privatenumber "git-for-windows" - so bash.exe, mingw64 geshizzle 😈
Broken:
-> "to get it to move on" it needs an extra-enter press there after i typed to the void
Fixed:
I investigated this and it seems like it's a problem with openai.createCompletion()
. I didn't investigate further but it seems to be leaving a handler open somewhere.
Honestly, the dependency was too large so I was considering removing it anyway. Will remove it and that should fix this.
Any plans on the timescale for that? ((I got no clue how much work that may entail... 😁))
But potentially I would pack up a "windows" branch then with this remedy to bridge...
Probably tomorrow.
I investigated further and I think it's actually a deeper issue in readline
:
https://github.com/nodejs/node/issues/31762#issuecomment-1441223907
seems that is the case yep (I didn´t further crosspost here as I had noticed you to be active on both ends ;D)
and can confirm,
"@clack/prompts": "^0.2.2", -> "@clack/prompts": "^0.6.0",
fixes it.
closing this PR - (and I assume you dont need a fresh one for that oneliner ;-) ) Thanks for investigating and fixing!