{# The prompt a background session's hook is holding for the dashboard (s.prompt): a permission, a question, or a plan. `compact` is the card's version: permission buttons inline, anything longer on the session's page. #} {% set p = s.prompt %} {% set back = back if back is defined else "/sessions/" ~ s.id %}
{% if p.kind == "permission" %}

Allow {{ p.detail or p.tool }}?

{% if not compact %}{% endif %}
{% elif compact %}

{{ "It has a plan for you to approve." if p.kind == "plan" else p.detail }}

{{ "Review the plan" if p.kind == "plan" else "Answer" }} {{ icon("arrow-right") }} {% elif p.kind == "question" %}
{% for q in p.questions %} {% set qi = loop.index0 %}
{{ q.question }} {% for o in q.options %} {% endfor %}
{% endfor %}
{% elif p.kind == "plan" %}
{{ p.plan or "The plan is in the session's plan file." }}
{% endif %}