Skip to content
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions agent-shell-heartbeat.el
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ Returns the heartbeat alist with the timer started."
(map-put! heartbeat :heartbeat-timer
(run-at-time 0 (/ 1.0 (map-elt heartbeat :beats-per-second))
(lambda ()
(map-put! heartbeat :status 'busy)
(map-put! heartbeat :value
(1+ (map-elt heartbeat :value)))
(funcall (map-elt heartbeat :on-heartbeat)
(map-elt heartbeat :value)
(map-elt heartbeat :status))))))
(when-let ((value (map-elt heartbeat :value)))
(map-put! heartbeat :status 'busy)
(map-put! heartbeat :value (1+ value))
(funcall (map-elt heartbeat :on-heartbeat)
(map-elt heartbeat :value)
(map-elt heartbeat :status)))))))
heartbeat))

(cl-defun agent-shell-heartbeat-stop (&key heartbeat)
Expand Down
6 changes: 3 additions & 3 deletions agent-shell.el
Original file line number Diff line number Diff line change
Expand Up @@ -5176,9 +5176,9 @@ See https://agentclientprotocol.com/protocol/session-modes for details."
('dots-round '("⢎⡰" "⢎⡡" "⢎⡑" "⢎⠱" "⠎⡱" "⢊⡱" "⢌⡱" "⢆⡱"))
('wide '("░ " "░░ " "░░░ " "░░░░" "░░░ " "░░ " "░ " " "))
((pred listp) agent-shell-busy-indicator-frames)
(_ '("▁" "▂" "▃" "▄" "▅" "▆" "▇" "█" "▇" "▆" "▅" "▄" "▃" "▂")))))
(concat " " (seq-elt frames (mod (map-nested-elt (agent-shell--state) '(:heartbeat :value))
(length frames))))))
(_ '("▁" "▂" "▃" "▄" "▅" "▆" "▇" "█" "▇" "▆" "▅" "▄" "▃" "▂"))))
(value (map-nested-elt (agent-shell--state) '(:heartbeat :value))))
(concat " " (seq-elt frames (mod value (length frames))))))

(defun agent-shell--mode-line-format ()
"Return `agent-shell''s mode-line format.
Expand Down