branch: externals/ellama
commit 7821c6621e4a330f605cbf25f111e7cf0b33076d
Author: Sergey Kostyaev <sskosty...@gmail.com>
Commit: Sergey Kostyaev <sskosty...@gmail.com>

    Add custom face for context keys
    
    Added a new face `ellama-key-face` to style the context line keys in both
    `ellama-blueprint.el` and `ellama-context.el`. Updated header line formats 
to
    use this new face for better visual distinction.
---
 ellama-blueprint.el | 16 ++++++++++------
 ellama-context.el   | 10 ++++++++--
 2 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/ellama-blueprint.el b/ellama-blueprint.el
index 83d6bbfe31..10d1c58fd2 100644
--- a/ellama-blueprint.el
+++ b/ellama-blueprint.el
@@ -73,22 +73,26 @@
   (setq header-line-format
        (concat
         (propertize
-         (substitute-command-keys
-          "`\\[ellama-transient-blueprint-mode-menu]' to continue")
+         (concat (propertize
+                  (substitute-command-keys
+                   "`\\[ellama-transient-blueprint-mode-menu]'")
+                  'face 'ellama-key-face)
+                 " to continue")
          'help-echo "mouse-1: show menu"
          'mouse-face 'header-line-format
-         'face 'ellama-context-line-face
          'keymap (let ((m (make-sparse-keymap)))
                    (define-key m [header-line mouse-1] 
#'ellama-transient-blueprint-mode-menu)
                    (define-key m [mode-line mouse-1] 
#'ellama-transient-blueprint-mode-menu)
                    m))
         " "
         (propertize
-         (substitute-command-keys
-          "`\\[ellama-kill-current-buffer]' to cancel")
+         (concat (propertize
+                  (substitute-command-keys
+                   "`\\[ellama-kill-current-buffer]'")
+                  'face 'ellama-key-face)
+                 " to cancel")
          'help-echo "mouse-1: kill buffer"
          'mouse-face 'header-line-format
-         'face 'ellama-context-line-face
          'keymap (let ((m (make-sparse-keymap)))
                    (define-key m [header-line mouse-1] 
#'ellama-kill-current-buffer)
                    (define-key m [mode-line mouse-1] 
#'ellama-kill-current-buffer)
diff --git a/ellama-context.el b/ellama-context.el
index 5d3390120e..76dc55f318 100644
--- a/ellama-context.el
+++ b/ellama-context.el
@@ -55,6 +55,10 @@
   "Face for ellama context line."
   :group 'ellama)
 
+(defface ellama-key-face '((t (:inherit help-key-binding)))
+  "Face for ellama context line."
+  :group 'ellama)
+
 (defvar ellama-context-global nil
   "Global context.")
 
@@ -242,8 +246,10 @@ the context."
   :keymap ellama-context-preview-mode-map
   :group 'ellama
   (setq header-line-format
-       (substitute-command-keys
-        "`\\[ellama-kill-current-buffer]' to quit")))
+       (concat (propertize (substitute-command-keys
+                            "`\\[ellama-kill-current-buffer]'")
+                           'face 'ellama-key-face)
+               " to quit")))
 
 (defcustom ellama-context-preview-element-display-action-function nil
   "Display action function for `ellama-context-preview-element'."

Reply via email to