Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nicobrenner opened this issue Mar 9, 2024 · 3 comments
Open

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

nicobrenner opened this issue Mar 9, 2024 · 3 comments

Comments

@nicobrenner
Copy link
Contributor

nicobrenner commented Mar 9, 2024

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
@nicobrenner
Copy link
Contributor Author

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! 🙏🏼

@mattvr
Copy link
Owner

mattvr commented Mar 11, 2024

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?

@nicobrenner
Copy link
Contributor Author

Cool, thank you, deno run -A mod.ts worked! 😄

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants