karthink / gptel

A simple LLM client for Emacs
GNU General Public License v3.0
1.04k stars 113 forks source link

Add custom gptel-update-destination #126

Closed codeasone closed 6 months ago

codeasone commented 8 months ago

This PR proposes a customisable option gptel-update-destination to enable status messages to appear strictly in the minibuffer and never appear in the header line.

karthink commented 7 months ago

Thank you for the PR, this looks useful!

My suggestions are minor: gptel-update-destination could be better named, and it would be better for the options to be symbols. Perhaps gptel-status-method, or gptel-display-method?

While we're at it, we could also add 'mode-line as an option, and make the gptel-mode lighter dynamic. Of course, many Emacs users hide all minor-mode mode-line indicators so this might not get much use.

karthink commented 6 months ago

For displaying status in the mode-line, it might be best to simply update the mode-line-process variable, as suggested in #9.

karthink commented 6 months ago

@codeasone I tweaked the idea slightly and merged. The user option is renamed to gptel-use-header-line, defaults to t. When set to nil, the mode-line is used to show in-progress requests (via mode-line-process, which is what the variable is meant for) and the echo area for error messages (as in your commit).

Thank you for the PR!