{% if character -%}
    {% set content_block_identifier = character.name + "'s next scene (ID 11)" %}
    {% set content_fix_identifier = character.name + "'s adjusted dialogue" %}
{% else -%}
    {% set content_block_identifier = "next narrative (ID 11)" %}
    {% set content_fix_identifier = "adjusted narrative" %}
{% endif -%}
{% set _ = set_state("content_fix_identifier", content_fix_identifier) %}
{% block rendered_context -%}
<|SECTION:CONTEXT|>
{%- with memory_query=scene.snapshot() -%}
    {% include "extra-context.jinja2" %}
{% endwith %}
{% if character %}
{{ character.name }}'s description: {{ character.description|condensed }}
{% endif %}

{{ text }}
<|CLOSE_SECTION|>
{% endblock -%}
<|SECTION:SCENE|>
{% set scene_history=scene.context_history(budget=max_tokens-512-count_tokens(self.rendered_context())) -%}
{% set final_line_number=len(scene_history) -%}
{% for scene_context in scene_history -%}
{{ loop.index }}. {{ scene_context }}
{% endfor -%}
{% if not scene.history -%}
No dialogue so far
{% endif -%}
<|CLOSE_SECTION|>
<|SECTION:CONTINUITY ERRORS|>

```{{ content_block_identifier }}
{{ content }}
```
<|CLOSE_SECTION|>
<|SECTION:TASK|>
Write a revised draft of "{{ content_block_identifier }}" and fix the continuity errors identified in "{{ content_block_identifier }}":

{% for error in errors -%}
{{ error }}

{% endfor %}

YOU MUST ONLY FIX CONTINUITY ERRORS, KEEP THE TONE, STYLE, AND MEANING THE SAME.

Your revision must be framed between "```{{ content_fix_identifier }}" and "```". Your revision must only be {{ character.name }}'s dialogue and must not include any other character's dialogue.
<|CLOSE_SECTION|>
{% if llm_can_be_coerced() -%}
{{ bot_token }}```{{ content_fix_identifier }}<|TRAILING_NEW_LINE|>
{% endif -%}