mirror of
https://github.com/perstarkse/minne.git
synced 2026-06-12 17:24:26 +02:00
7b850769c9
Avoid nested forms in the scratchpad editor, centralize modal lifecycle in modal.js, return HTMX partials from archive, and add template compile plus layout snapshots.
36 lines
1.1 KiB
HTML
36 lines
1.1 KiB
HTML
{% extends "modal_base.html" %}
|
|
|
|
{% block modal_class %}max-w-3xl{% endblock %}
|
|
|
|
{% block form_attributes %}
|
|
hx-patch="/update-query-prompt"
|
|
hx-target="#system_prompt_section"
|
|
hx-swap="outerHTML"
|
|
{% endblock %}
|
|
|
|
{% block modal_content %}
|
|
<h3 class="text-xl font-extrabold tracking-tight mb-2">Edit System Prompt</h3>
|
|
|
|
<div class="form-control">
|
|
<textarea name="query_system_prompt" class="nb-input h-96 w-full font-mono text-sm">{{
|
|
settings.query_system_prompt }}</textarea>
|
|
<p class="text-xs opacity-70 mt-1">System prompt used for answering user queries</p>
|
|
</div>
|
|
{% endblock %}
|
|
|
|
{% block primary_actions %}
|
|
<button type="button" class="nb-btn w-full sm:w-auto sm:mr-2"
|
|
data-reset-target="textarea[name=query_system_prompt]">
|
|
Reset to Default
|
|
</button>
|
|
|
|
<textarea id="default_prompt_content" style="display:none;">{{ default_query_prompt }}</textarea>
|
|
|
|
<button type="submit" class="nb-btn nb-cta w-full sm:w-auto">
|
|
<span class="htmx-indicator hidden">
|
|
<span class="loading loading-spinner loading-xs mr-2"></span>
|
|
</span>
|
|
Save Changes
|
|
</button>
|
|
{% endblock %}
|