paul-gauthier / aider

aider is AI pair programming in your terminal
https://aider.chat/
Apache License 2.0
14.46k stars 1.36k forks source link

Honor readlines 'show-mode-in-prompt' setting. #823

Open harleypig opened 2 weeks ago

harleypig commented 2 weeks ago

Issue

This is a feature request, not an issue.

It would be nice to see what mode the prompt is currently in instead of pressing keys to see what happens.

Readline can show the mode (insert or command) in the prompt via the show-mode-in-prompt setting. This works for emacs and vi, but I don't know what emacs looks like (it uses the emacs-mode-string to customize it).

For example, I use the vi-cmd-mode-string and vi-ins-mode-string to let me know in my bash prompt, python debugger prompt, and other programs that honor these settings.

Insert mode looks like (green on black background):

|INS| $

while command mode looks like (yellow on red background):

<CMD> $ 

Version and model info

No response

harleypig commented 2 weeks ago

Hmmm ... processing .inputrc is not supported.

Still, it'd be nice to have some indicator of the current mode.

paul-gauthier commented 1 week ago

Thanks for trying aider and filing this issue.

Aider uses prompt toolkit for input promoting. It's probably possible to add these features without too much work.