feat: chat improvements, file viewer, usage fixes, and agent filesystem awareness

This commit is contained in:
2026-04-16 13:42:06 +02:00
parent b6a5d169a9
commit a72eef4b82
10 changed files with 319 additions and 470 deletions

View File

@@ -6,12 +6,20 @@
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:24px">
<h1>Usage</h1>
<!-- Time range filter -->
<div style="display:flex;gap:6px">
<!-- Time range filter + admin actions -->
<div style="display:flex;gap:6px;align-items:center">
<button class="btn" id="usage-range-today" type="button" onclick="setUsageRange('today')">Today</button>
<button class="btn" id="usage-range-7d" type="button" onclick="setUsageRange('7d')" style="background:var(--accent);color:#fff;border-color:var(--accent)">7 days</button>
<button class="btn" id="usage-range-30d" type="button" onclick="setUsageRange('30d')">30 days</button>
<button class="btn" id="usage-range-all" type="button" onclick="setUsageRange('all')">All time</button>
{% if current_user and current_user.is_admin %}
<div style="width:1px;height:20px;background:var(--border);margin:0 4px"></div>
<button class="btn" type="button" onclick="clearUsageCost()"
style="color:var(--danger,#dc3c3c);border-color:var(--danger,#dc3c3c)"
title="Delete all agent run history and reset cost estimates">
Clear costs
</button>
{% endif %}
</div>
</div>