Skip to content

Commit

Permalink
Improve task rendering
Browse files Browse the repository at this point in the history
  • Loading branch information
jlowin committed Oct 2, 2024
1 parent 0c16e9c commit 71426cb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/controlflow/orchestration/prompt_templates/tasks.jinja
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
{% macro render_task_hierarchy(task_info, indent='') -%}
{{ indent }}- {{ task_info.task.id }} ({{ task_info.task.status.value }}){% if task_info['is_active'] %}
(active){% endif %}
{{ indent }}- {{ task_info.task.id }} ({{ task_info.task.status.value }}){% if task_info['is_active'] %} (active){%
endif %}
{%- if task_info.children %}

{% for child in task_info.children %}
{{ render_task_hierarchy(child, indent + ' ') }}
{{ render_task_hierarchy(child, indent + '-') }}
{%- endfor %}
{%- endif %}
{%- endmacro -%}
Expand All @@ -21,6 +22,8 @@ The following tasks are active:

{{ task.get_prompt() }}
</Task>


{% endfor %}

Only agents assigned to a task are able to mark the task as complete. You must
Expand Down

0 comments on commit 71426cb

Please sign in to comment.