mattvr/ShellGPT

Request: be able to paste long pieces of text in repl mode

Opened this issue ยท 3 comments

I wanted to paste 394 lines of text, mostly code and then a prompt at the end (like the snippet below)

But when I tried pasting the text, gpt cut it off pretty early, then got stuck in a loop of getting pieces of the text and then giving a really long answer, then it even stopped responding to CTRL+C (^C), so I had to kill the process, but then the text kept pasting and executing in bash, so I had to kill the terminal ๐Ÿ˜…๐Ÿคฃ (You can see the whole thing at 20:17 here: https://www.loom.com/share/cab4f33752b44e5f8b77d30a0299d69e?t=1217)

Anyway, it would be cool to be able to paste large prompts ๐Ÿ™๐Ÿผ

I understand that maybe I could store the whole thing in a file and pipe it in without the repl option, but then I would lose the history/context, which is helpful in my coding interactions with chatgpt

# 300+ lines of code

The above is a python3 and ncurses application. And it needs tests. Write a test for the Add/Edit resume feature.
Provide python3 code, a description of the test, the path of the file where to save the test, instructions on how to run it.
No yapping please

Was trying to run the code on my computer, I cloned the repo, pulled from main, created a branch

I couldn't find anything in the README about how to run/build the application

Looked up the deno documentation and tried deno run mod.ts, but then the Enter key doesn't work, it just types out ^M, but it's not captured

Then saw the command inside the gpt executable script and tried exec deno run --allow-all --no-config mod.ts "$@"

That worked, but it asked me to update, I said no and then in closed the whole terminal window, which I wasn't expecting

Anyway, it would be great to have some documentation on the README about how to run/build the application from source

Thank you! ๐Ÿ™๐Ÿผ

Thanks for reporting this. There's some custom handling of newlines to allow code to be pasted in. As a short-term workaround you could try using non-repl mode and cat the file.

Not sure if I'll have time to fix soon, but as for how to develop, you should be able to just do deno run -A mod.ts --repl?

Cool, thank you, deno run -A mod.ts worked! ๐Ÿ˜„

Created a PR adding a small Development section to the README (#22)