{% load i18n djpa %} {% comment %} One line of the transcript. The context: kind (user, assistant, tool_call, tool_result or error), text and tool_name. A tool line is a closed details element: the summary shows the words, and the user opens it to see the data. {% endcomment %} {% if kind == "user" %}
{{ text|linebreaksbr }}
{% elif kind == "assistant" %}
{{ text|djpa_reply_html }}
{% elif kind == "tool_call" %}
{% include "dj_pydantic_agents/tool_label.html" with tool_name=tool_name state="called" only %}
{{ text }}
{% elif kind == "tool_result" %}
{% include "dj_pydantic_agents/tool_label.html" with tool_name=tool_name state="result" only %}
{{ text }}
{% elif kind == "error" %}
{{ text }}
{% endif %}