-
Notifications
You must be signed in to change notification settings - Fork 162
Tweaking the UI
karthink edited this page Dec 6, 2024
·
1 revision
Each buffer can have its own value of gptel-model
, gptel-backend
and other settings. (You can set these parameters buffer-locally using gptel's transient menu.)
Chat buffers indicate the active model in the header line (or the mode line if you unset gptel-use-header-line
). But regular buffers don't. If you want a reminder when a buffer has a different value of gptel-model
, you can display it in the mode line:
(add-to-list
'mode-line-misc-info
'(:eval
(unless gptel-mode
(when (and (local-variable-p 'gptel-model)
(not (eq gptel-model (default-value 'gptel-model))))
(concat "[" (gptel--model-name gptel-model) "]")))))
Nothing will display in buffers that don't have a buffer-local value of gptel-model
.
Alternatively, you might want to always see the active gptel-model
, especially if you use the tab bar:
;; If using the tab-bar, make sure `tab-bar-format-global' is included:
(add-to-list 'tab-bar-format 'tab-bar-format-align-right 'append)
(add-to-list 'tab-bar-format 'tab-bar-format-global 'append)
;; Add `gptel-model' to the global mode string
(add-to-list 'global-mode-string
'(:eval (concat "[" (gptel--model-name gptel-model) "]")))