{# Code diff component. Expects: diff_lines (list of dicts with 'type' and 'content'), file_path (str, optional) #} {% if file_path %}
{{ file_path }}
{% endif %}
{% for line in diff_lines %} {% if line.type == 'hunk' %}
{{ line.content }}
{% elif line.type == 'add' %}
+{{ line.content }}
{% elif line.type == 'delete' %}
-{{ line.content }}
{% else %}
 {{ line.content }}
{% endif %} {% endfor %}