{# Todo list #}
{% macro todo_list(todos, tool_id) %}
☰ Task List
{%- for todo in todos -%}
{%- set status = todo.status|default('pending') -%}
{%- set content = todo.content|default('') -%}
{%- if status == 'completed' -%}
{%- set icon = '✓' -%}
{%- set status_class = 'todo-completed' -%}
{%- elif status == 'in_progress' -%}
{%- set icon = '→' -%}
{%- set status_class = 'todo-in-progress' -%}
{%- else -%}
{%- set icon = '○' -%}
{%- set status_class = 'todo-pending' -%}
{%- endif -%}
{{ icon }}{{ content }}
{%- endfor -%}
{%- endmacro %}
{# Write tool #}
{% macro write_tool(file_path, content, tool_id) %}
{%- set filename = file_path.split('/')[-1] if '/' in file_path else file_path -%}
📝 Write {{ filename }}
{{ file_path }}
{{ content }}
{%- endmacro %}
{# Edit tool #}
{% macro edit_tool(file_path, old_string, new_string, replace_all, tool_id) %}
{%- set filename = file_path.split('/')[-1] if '/' in file_path else file_path -%}
{%- endif %}
{%- endmacro %}
{# Index stats - tool_stats_str and long_texts_html are pre-rendered so need |safe #}
{% macro index_stats(tool_stats_str, long_texts_html) %}
{%- if tool_stats_str or long_texts_html -%}
{%- endif %}
{%- endmacro %}
{# Long text in index - rendered_content is pre-rendered markdown so needs |safe #}
{% macro index_long_text(rendered_content) %}