{% extends "space-settings-base.html" %} {% from "ui.html" import csrf_field with context %} {% from "editor.html" import editor with context %} {% set preview_url = "/o/" ~ org.slug ~ "/" ~ space.slug ~ "/-/vocation/preview" %} {# The preview without JS: the typed text rendered under its form, nothing saved. #} {% macro shown(key) %}{% if preview_for == key %}

{{ _("Preview — not saved yet") }}

{{ preview_html|safe if preview_html.strip() else _("(empty text)") }}
{% endif %}{% endmacro %} {% set section = "prompts" %} {% block section %}

{{ _("Your team's rituals (meeting notes, a decision, a weekly review…), offered to every assistant connected to Synaptane: in Claude, the “/” or “+” menu; the assistant receives the text with the arguments filled in. One file per prompt, .synaptane/prompts/.md, saved in the repository like the purpose.") }}

{{ _("How to write one") }}
{% for p in prompts %} {% set doc = documents[p.name] %}

{{ p.title }}

/{{ p.mcp_name }}
{% if p.description %}

{{ p.description }}

{% endif %} {% if error and error_for == p.name %}{% endif %}
{{ csrf_field() }} {# The version the draft started from, kept through a preview or an error. #} {% set label %}{{ _("Text (Markdown)") }} · {{ doc.path }}{% endset %} {{ editor(drafts[p.name] if p.name in drafts else doc.text, 12, preview_url, id="prompt-" ~ p.name ~ "-text", label=label, params={"kind": "prompt"}, classes="editor vocation-editor", help=_("An empty text removes the prompt.")) }}
{{ shown(p.name) }}
{% else %}

{{ _("No prompt yet.") }}

{% endfor %} {% if prompts|length < limit %}

{{ _("New prompt") }}

{% if error and not error_for %}{% endif %}
{{ csrf_field() }}
{{ editor(drafts[""] if "" in drafts else example, 14, preview_url, id="new-prompt-text", label=_("Text (Markdown)"), params={"kind": "prompt"}, classes="editor vocation-editor") }}
{{ shown("") }}
{% endif %} {% endblock %}