{% extends "base.html" %} {% block title %}Settings Β· ai-protect{% endblock %} {% block autorefresh %}window.AI_PROTECT_NO_AUTOREFRESH = true;{% endblock %} {% block content %}

Settings

Configuration persisted to ~/.ai-protect/config.json (chmod 600 β€” may contain secrets). Help bubbles link to /docs for step-by-step setup.

{% if ok %}
{{ ok }}
{% endif %} {% if errors %}
{{ errors|length }} field(s) had errors β€” see inline messages below
{% endif %}
{# Left rail β€” section navigator #} {# Section bodies β€” all rendered, all scrollable; left-rail jumps via anchors. #}
{% for section in schema %}

{{ section.title }}

{{ section.description }}

{% for fld in section.fields %} {% set cur = current.get(fld.key, fld.default) %} {% set err = errors.get(fld.key) %} {# A field is initially visible if no reveal-controller hides it. JS below handles dynamic hide/show as the controller changes. #}
{# field render β€” by kind #} {% if fld.kind == "select" %} {% if fld.free_text_override %} {% endif %} {% elif fld.kind == "checkbox" %} {% elif fld.kind == "textarea" %} {% elif fld.kind in ("password",) %} {% elif fld.kind == "number" %} {% else %} {% endif %} {% if fld.help and fld.kind != "checkbox" %} {# nosemgrep: template-unescaped-with-safe β€” fld.help is static, developer-authored HTML from settings.py SCHEMA (never user input) #} {{ fld.help|safe }} {% endif %} {% if err %}
{{ err }}
{% endif %}
{% endfor %} {% if section.key == "locale" %}
Preview: {{ sample }}
{% endif %}
{% endfor %}
Empty fields use defaults from the schema. Hover any ? for inline help.
{% endblock %}