{% extends "admin_layout.html" %} {% block active_nav %}templates{% endblock %} {% block title %}模板管理 · 管理后台{% endblock %} {% block content %}

📄 Prompt 模板管理

{% if templates_readonly %}

🔒 线上模板只读:本站点模板不可在后台修改/还原(单一事实来源 = git 内置)。 要改模板,请在本地源码版直接修改内置模板(app/<module>/templates/), git push 发布后此处自动生效。

{% else %}

这里列出调用 AI 时使用的全部提示词模板。可直接修改/调整(保存后立即生效,不碰代码, git push 即部署 不会覆盖你的定制);「还原」恢复内置/代码默认。

{% endif %} {% for module, items in templates | groupby('module') %}

{{ items[0].module_label }}

{% for t in items %}
{{ t.title }} {% if t.source == 'override' %}已自定义 {% else %}内置{% endif %}
{{ t.desc }} · {{ t.module }}/{{ t.name }}
{% if templates_readonly %} 🔒 只读 {% else %} 编辑 {% if t.source == 'override' %}
{% endif %} {% endif %}
{% endfor %} {% endfor %} {% endblock %}