Comment by sshine
2 months ago
Mind blown.
This is so simple.
It’s like rlwrap, but generic. So you could reimplement rlwrap with this.
I’ve been experimenting with schemesh recently. It’s a shell with ask control structures in scheme. Amazing, but a little immature still. Having a scheme middleware would be stronger: I can have a full zsh where a control key drops me onto a Scheme interpreter.
Now, how far up your process tree do you want to host it?
https://9ol.es/tmp/fizzbuzz.webm
Finally kind of working. There's the first demo video
I escape out three times: once for basic shell help, the next while I'm inside of vim and finally at the python interpreter. The recent input and output are the context clues to solve the query, which is the part in reverse video.
Then the code is injected into the proxy wrapper
https://github.com/kristopolous/llmehelp/tree/main/shellwrap is the code.