mkht / PSOpenAI

PowerShell module for OpenAI API.
MIT License
41 stars 11 forks source link

Press Enter to confirm and for automatic line wrapping in PowerShell ISE #5

Open Davider-code opened 8 months ago

Davider-code commented 8 months ago

I usually use PowerShell ISE for code editing, and I have encountered two issues:

  1. After inputting a question, I need to press Enter three times to confirm. Can I use Ctrl+Enter to confirm directly?
  2. When the text length of ChatGPT's answer is too long, a scrollbar appears, displaying it all in one line, which is not very convenient for reading. Can it automatically wrap at the width of the window? demo Gif: gpt
mkht commented 8 months ago

Hmmm, I think it's a bit difficult, I also thought of a way to Ctrl+Enter to send, but there doesn't seem to be a good way to get it to work correctly in all of Terminal, PowerShell ISE, and VSCode. Especially the ISE console is very specific and many of the tricks available in the regular terminal doesn't work.

I wrote Enter-ChatGPT as a small demonstration and do not intend to implement it in a much more complicated way.

I am sorry that I could not satisfy your request.