v0.7.2: HITL panel collapse on approve/deny — TDD
resolve-hitl-panel marks the most recent panel message with :panel-resolved (:approved or :denied) and writes back to the message vector. View-chat renders resolved panels with dimmed color instead of :hitl theme color. /approve and /deny handlers call resolve-hitl-panel after sending structured events to the daemon. Confirmation messages now use checkmark/crossmark prefixes. - channel-tui-main: resolve-hitl-panel fn, wired into handlers - channel-tui-view: is-resolved check for panel dimming - +2 tests: panel-after-approve, panel-after-deny - TUI Main: 88/89 (1 pre-existing flake)
This commit is contained in:
@@ -85,11 +85,14 @@ Returns list of trimmed strings. Single words wider than width are split."
|
||||
(color (theme-color (case role (:user :user) (:agent :agent) (:system :system) (t :agent))))
|
||||
(prefix (case role (:user "⬆") (:agent "⬇") (t " ")))
|
||||
(is-panel (getf msg :panel))
|
||||
(is-resolved (getf msg :panel-resolved))
|
||||
(line-text (format nil "~a [~a] ~a" prefix time content))
|
||||
(wrapped (word-wrap line-text (- w 2))))
|
||||
;; HITL panel: render with colored border
|
||||
(when is-panel
|
||||
(setf color (theme-color :hitl)))
|
||||
(setf color (if is-resolved
|
||||
(theme-color :dim)
|
||||
(theme-color :hitl))))
|
||||
(dolist (line wrapped)
|
||||
(when (< y (1- h))
|
||||
(if (eq role :agent)
|
||||
|
||||
Reference in New Issue
Block a user