Open
Description
Hey!
This isn’t really an issue; more of a suggestion and a small contribution from my side.
I often found myself wanting a quick menu to remind me of the things I can do, and I thought chatgpt-shell could benefit from something similar to Aidermacs's transient menu:
So I went ahead and created a transient menu for chatgpt-shell. Here’s a short video showing how it works:
demo.mp4
Let me know if this is something you'd like in the package! I’d be happy to open a PR in the next few days! 👍🏾
Metadata
Metadata
Assignees
Labels
No labels
Activity
xenodium commentedon Apr 4, 2025
Ooh yay! Thanks for the proposal. Sorry for the delay. I've been meaning to add transient for quite some time. I had a rough patch somewhere, but was for the compose buffer.
I've been contemplating either getting rid of some of these commands I see listed as they can be easily replaced by
chatgpt-shell-quick-insert
or maybe re-implemt using the same insertion mechanism.One thing I'm wondering is how to deal with vanilla vs evil bindings. I'm not super familiar with evil, but j/k are vim bindings right? Do you know how other packages do it for their transient menus?
rogsme commentedon Apr 4, 2025
No worries my dude! I can take this one, no problem 😁
If you have a list of commands you want added to the menu, I can replace them 👍🏾
I use evil bindings, and this menu works perfectly fine!
I don't know, but I can investigate! There might be a vanilla version we can use. I have some time to put into this this weekend, once I have an update I'll let you know 👍🏾
rogsme commentedon Apr 4, 2025
A quick update, we might be able to get away with using
define-prefix-command
. I'll try converting my menu todefine-prefix-command
and see if it works 👍🏾djr7C4 commentedon Apr 5, 2025
Nice! This looks like a good addition.
xenodium commentedon Apr 23, 2025
Ok, here's the compose buffer one. It shows up automatically after LLM provider replies, unless
chatgpt-shell-compose-auto-transient
is unset. Menu organization, bindings, etc. aren't final.rogsme commentedon Apr 23, 2025
That looks great! Sorry I haven’t been able to work on this lately, I’m on vacation overseas 😂
I’ll pick it back up next week when I’m back! But seriously, your menu looks way better than transient. Do you have a PR? Feel free to use mine as a base 👍🏾
xenodium commentedon Apr 23, 2025
No worries at all. There's no hurry here.
Hope you're somewhere nice enjoying yourself!
It's transient too :) 2aa82cd
rogsme commentedon Apr 23, 2025
Oh, it's already merged! I remember I went with a vertical menu instead of horizontal because transient doesn’t play well with split window buffers. That’s why
magit
andaider
do the same thing too. I'll update chatgpt-shell and test! 🔥And it's no worry haha, I'm on vacation but still working today 😂
xenodium commentedon Apr 23, 2025
This transient menu is for the compose buffer only. We still need your menu for the other buffers.
Good point. Let's see how well it works in practice. Happy to move to a more vertical approach if needed.
xenodium commentedon Apr 23, 2025
😭
rogsme commentedon Apr 24, 2025
Hey @xenodium! This is how it looks like in split mode:
I guess vertical is the way to go then?
xenodium commentedon Apr 24, 2025
Sounds like it. So a 2 column width max?
ps. The transient I submitted was mostly thinking in the context of compose buffers. Some of the functions are unlikely to work on the shell.
rogsme commentedon Apr 24, 2025
In my example, I was able to squeeze in a bit more short columns:
Also, my PR worked across all of Emacs (not just in compose buffers) and it was interactive. When invoked with a region selected, the menu options would adapt accordingly. Would you like me to include that as well?
(I'm refering to the PR description in #343)
xenodium commentedon Apr 24, 2025
I think we need at least 2 transient menus. The compose one is very specific to compose buffer but also right after LLM replied and thus buffer goes read-only.
We can bring in your PR menu also.