From 54bc11ae6d7018c043d5b78b3e3a1a2ee55b87e0 Mon Sep 17 00:00:00 2001 From: Ollie Agent Date: Tue, 4 Aug 2026 20:35:25 +0200 Subject: [PATCH] ellie tree: RET expands/collapses sessions too, fix indent --- contrib/elisp/ellie.el | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/contrib/elisp/ellie.el b/contrib/elisp/ellie.el index 5ee35dc..c30607e 100644 --- a/contrib/elisp/ellie.el +++ b/contrib/elisp/ellie.el @@ -403,7 +403,7 @@ Prompts for agent profile and other options." (dolist (a agents) (let ((aname (car a)) (aid (nth 1 a)) (state (nth 2 a))) (push (list 'agent id aid - (format " %s [%s]" aname state)) + (format " %s [%s]" aname state)) result))))))) ;; Inactive header (when inactive @@ -418,7 +418,7 @@ Prompts for agent profile and other options." (dolist (a agents) (let ((aname (car a)) (aid (nth 1 a)) (state (nth 2 a))) (push (list 'agent id aid - (format " %s [%s]" aname state)) + (format " %s [%s]" aname state)) result)))))))) (setq ellie--tree-data (nreverse result)))) @@ -472,19 +472,14 @@ Prompts for agent profile and other options." (ellie--tree-render)))) (defun ellie-tree-activate () - "Activate (select) the item at point." + "Activate (select) or expand/collapse the item at point." (interactive) (let ((key (get-text-property (point) 'ellie-key)) (type (get-text-property (point) 'ellie-type)) (parent (get-text-property (point) 'ellie-parent))) (cond - ((eq type 'header) + ((memq type '(header session)) (ellie-tree-toggle)) - ((eq type 'session) - (setq ellie--session-id key - ellie--agent-id nil) - (ellie--persist-session key) - (message "Session: %s" key)) ((eq type 'agent) (setq ellie--session-id parent ellie--agent-id key)