{% set rendered_context -%}
{% include "character-context.jinja2" -%}
{% include "memory-context.jinja2" -%}
{% include "extra-context.jinja2" -%}
{% if context_investigation %}
<|SECTION:POTENTIALLY RELEVANT INFORMATION|>
{{ context_investigation }}
<|CLOSE_SECTION|>
{% endif %}
{% endset %}
{{ rendered_context }}
{% include "content-classification.jinja2" %}
{% set scene_context = scene.context_history(
    budget=max_tokens-300-count_tokens(rendered_context), 
    min_dialogue=15, 
    sections=False, 
    keep_director=False, 
    chapter_labels=True
    ) 
-%}
{% set scene_context_text %}
{% for scene_line in scene_context -%}
{{ scene_line }}

{% endfor %}
{% endset %}
<|SECTION:SCENE|>
{{ scene_context_text }}
<|CLOSE_SECTION|>
{% with _text=scene_context_text %}{% include "internal-note-help.jinja2" %}{% endwith %}