{# AI Intent + AI Change Summary section — shared include for watch edit and tag/group edit. Required template context: llm_configured — bool: LLM provider is configured in settings form — the WTForms form (must have .llm_intent and .llm_change_summary fields) Optional (watch edit only): watch — the Watch object (for processor check and prefilter display) llm_intent_source — str: 'watch', tag title, or '' (for inherited-from-tag hint) Usage in watch edit (edit.html): {% include "edit/include_llm_intent.html" %} Usage in tag edit (edit-tag.html): {% include "edit/include_llm_intent.html" %} (watch is not set → tag mode: no processor check, no examples, different description) #} {# Watch edit: only show for text_json_diff processor #} {% if watch is defined and watch %} {% set is_text_json_diff = not watch.get('processor') or watch.get('processor') == 'text_json_diff' %} {% else %} {% set is_text_json_diff = true %} {% endif %} {% if is_text_json_diff %} {# ── Configured: show the intent + summary textareas ─────────────── #} {% if llm_configured %}

✨ {{ _('AI') }}

{# — AI Change Intent — #}

{{ _('AI — Notify when…') }}

{% if watch is defined and watch %} {{ _('Describe what you care about. The AI evaluates every detected change against this and only notifies you when it matches.') }} {% if llm_intent_source is defined and llm_intent_source and llm_intent_source != 'watch' %}
{{ _('Inherited from tag:') }} {{ llm_intent_source }} — {{ _('type here to override for this watch only') }} {% endif %} {% else %} {{ _('Set a change intent for all watches in this tag/group. Each watch can override with its own.') }} {% endif %}

{% if watch is defined and watch %}
{{ _('Examples:') }}
{% if watch.get('llm_prefilter') %}
{{ _('AI pre-filter active:') }} {{ watch.get('llm_prefilter') }} — {{ _('narrows content scope before evaluation') }}
{% endif %} {% endif %}
{# — AI Change Summary — #}

{{ _('AI Change Summary') }}

{% if watch is defined and watch %} {{ _('When a change is detected, the AI describes it according to your instructions and replaces') }} {{ '{{diff}}' }} {{ _('in your notification. Use') }} {{ '{{raw_diff}}' }} {{ _('if you still want the original diff.') }} {% else %} {{ _('Describe how changes should be summarised in notifications for all watches in this group.') }} {% endif %}

{% if watch is defined and watch %}
{{ _('Examples:') }}
{% endif %}
{# ── Not configured: greyed-out prompt to configure ──────────────── #} {% else %}

✨ {{ _('AI') }}

{{ _('Configure an AI/LLM provider in') }} {{ _('Settings → AI/LLM') }} {% if watch is defined and watch %} {{ _('to enable AI Change Intent and AI Change Summary.') }} {% else %} {{ _('to enable AI features for this group.') }} {% endif %}

{% endif %} {% endif %}{# is_text_json_diff #}