first commit
This commit is contained in:
21
public_web/templates/dev/partials/history.html
Normal file
21
public_web/templates/dev/partials/history.html
Normal file
@@ -0,0 +1,21 @@
|
||||
{# History entries partial #}
|
||||
{% if history %}
|
||||
{% for entry in history|reverse %}
|
||||
<div class="history-entry">
|
||||
<div class="history-turn">Turn {{ entry.turn }}</div>
|
||||
<div class="history-action">{{ entry.action }}</div>
|
||||
<div class="history-response">{{ entry.dm_response[:150] }}{% if entry.dm_response|length > 150 %}...{% endif %}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
{% if pagination and pagination.has_more %}
|
||||
<button hx-get="{{ url_for('dev.get_history', session_id=session_id) }}?offset={{ pagination.offset + pagination.limit }}"
|
||||
hx-target="#history-content"
|
||||
hx-swap="innerHTML"
|
||||
style="width: 100%; padding: 0.5rem; background: #3b82f6; color: white; border: none; border-radius: 4px; cursor: pointer; font-size: 0.8rem;">
|
||||
Load More
|
||||
</button>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
<p style="color: #9ca3af; text-align: center; font-size: 0.85rem;">No history yet.</p>
|
||||
{% endif %}
|
||||
Reference in New Issue
Block a user