{% from "_macros.html" import icon %} {# How many commands are still running on the far side. Rendered even at zero, and that is not a stylistic choice: this element carries the `hx-trigger` that polls, so a fragment that collapsed to nothing would replace itself with nothing and stop polling -- the first job started afterwards would never appear, and the chip would look broken in exactly the way a background job is hardest to notice. Swapped `outerHTML` onto itself, so the reply is the whole element including the trigger. Every response has to be a complete chip for the same reason. `hx-target="this"`, explicitly, because this element lives inside the composer's form and htmx INHERITS `hx-target` from ancestors -- that form carries `hx-target="#thread"` so a sent message appends a bubble, and without a target of its own this poll resolved there and replaced the whole transcript with itself every five seconds. It blanked every agent chat. #}
{% if running %}
{# Filled by the button above rather than rendered here: the panel needs one SSH round trip per expanded log, and the chip is polled every five seconds. Rendering it inside the poll would fetch output nobody has opened, on a loop. #}
{% endif %}