{% set character_direction=scene.last_message_of_type("director", source=character.name, max_iterations=3) -%}
{% if not direction and character_direction %}{% set direction=character_direction %}{% endif -%}
{% if rerun_context and rerun_context.direction -%}
{% if rerun_context.method == 'replace' -%}{{ rerun_context.direction }}
{%- elif rerun_context.method == 'edit' and rerun_context.message -%}
Edit this draft of the proposed continuation in the scene: 

``` first draft
{{ rerun_context.message }}
```

{% if direction %}Original instructions: "{{ direction }}"
{% endif -%}
Editorial instructions: "{{ rerun_context.direction }}"
{% endif -%}
{% endif -%}