Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions agent-shell.el
Original file line number Diff line number Diff line change
Expand Up @@ -2288,6 +2288,7 @@ BINDINGS is a list of alists defining key bindings to display, each with:
;; | | Bottom text line
;; +------+
;; [Qualifier] Bindings row (optional, last row)
;;
(let* ((cache-key (agent-shell--header-cache-key header-model))
(cached (progn
(unless agent-shell--header-cache
Expand All @@ -2300,9 +2301,11 @@ BINDINGS is a list of alists defining key bindings to display, each with:
(row-spacing 0) ; Spacing between icon/text rows and bindings row
(icon-text-row-height image-height)
(bindings-row-height (if (or bindings qualifier) text-height 0))
(total-height (+ icon-text-row-height bindings-row-height 10))
(bottom-padding text-height)
(total-height (+ icon-text-row-height bindings-row-height bottom-padding))
(icon-x 5)
;; Y positions for each row (baseline positions for text)
(icon-y 0)
(icon-y 10)
(icon-text-y text-height)
;; Bindings positioned right after the bottom text (2 text lines) plus spacing
(bindings-y (+ (* 3 text-height) row-spacing))
Expand All @@ -2317,10 +2320,10 @@ BINDINGS is a list of alists defining key bindings to display, each with:
(when (and icon-filename image-type)
(svg-embed svg icon-filename
image-type nil
:x 0 :y icon-y :width image-width :height image-height))
:x icon-x :y icon-y :width image-width :height image-height))
;; Top text line
(svg--append svg (let ((text-node (dom-node 'text
`((x . ,(+ image-width 10))
`((x . ,(+ icon-x image-width 10))
(y . ,icon-text-y)))))
;; Agent name
(dom-append-child text-node
Expand Down Expand Up @@ -2365,7 +2368,7 @@ BINDINGS is a list of alists defining key bindings to display, each with:
text-node))
;; Bottom text line
(svg-text svg (string-remove-suffix "/" (abbreviate-file-name (map-elt header-model :directory)))
:x (+ image-width 10) :y (+ icon-text-y text-height)
:x (+ icon-x image-width 10) :y (+ icon-text-y text-height)
:fill (face-attribute 'font-lock-string-face :foreground))
;; Bindings row (last row if bindings or qualifier present)
(when (or bindings qualifier)
Expand Down