ellie tree: RET expands/collapses sessions too, fix indent
This commit is contained in:
parent
0c35567de0
commit
54bc11ae6d
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue