node-chatgpt-api icon indicating copy to clipboard operation
node-chatgpt-api copied to clipboard

[feature request]Multiline input in CLI interface and alt+enter to submit

Open PaTTeeL opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe. The CLI interface submits the prompts with enter, which makes it hard to input multiline prompts, and a newline character also submits prompts in pasted content.

Describe the solution you'd like Can we have alt+enter or an option to choose the prompts submit signal, which makes typing multiline prompts easier ?

PaTTeeL avatar Apr 03 '23 09:04 PaTTeeL

Use the "!editor" command. IIRC the CLI even says to use it for multi-line inputs.

waylaidwanderer avatar Apr 03 '23 09:04 waylaidwanderer

Use the "!editor" command. IIRC the CLI even says to use it for multi-line inputs.

That's very useful in code paste! It would be great if there is an option to choose the submit signal.

PaTTeeL avatar Apr 03 '23 09:04 PaTTeeL

I tried to take a stab at it to implement directly from the prompt but its almost impossible in node.js: https://stackoverflow.com/questions/66604677/how-to-detect-shift-enter-in-nodejs-terminal/76099130

pathikrit avatar May 04 '23 13:05 pathikrit