feat: chat improvements, file viewer, usage fixes, and agent filesystem awareness
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
<img src="{{ logo_url }}" alt="logo" class="sidebar-logo-img">
|
||||
<div class="sidebar-logo-text">
|
||||
<div class="sidebar-logo-name">{{ brand_name }}</div>
|
||||
<div class="sidebar-logo-app">oAI-Web <span class="sidebar-logo-version">v1.2.2</span></div>
|
||||
<div class="sidebar-logo-app">oAI-Web <span class="sidebar-logo-version">v1.2.3</span></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<th>Name</th>
|
||||
<th style="width:100px;text-align:right">Size</th>
|
||||
<th style="width:170px">Modified</th>
|
||||
<th style="width:140px"></th>
|
||||
<th style="width:180px"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="file-tbody">
|
||||
@@ -58,4 +58,20 @@
|
||||
|
||||
</div>
|
||||
|
||||
<!-- File viewer modal -->
|
||||
<div class="modal-overlay" id="file-viewer-modal" style="display:none;align-items:flex-start;padding:40px 16px"
|
||||
onclick="if(event.target===this)closeFileViewer()">
|
||||
<div class="modal" style="max-width:860px;width:100%;max-height:calc(100vh - 80px);display:flex;flex-direction:column">
|
||||
<div class="modal-header" style="display:flex;align-items:center;justify-content:space-between;margin-bottom:12px">
|
||||
<span id="fv-title" style="font-family:var(--mono);font-size:13px;color:var(--text-dim);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;max-width:calc(100% - 40px)"></span>
|
||||
<button class="btn btn-ghost btn-small" onclick="closeFileViewer()">✕</button>
|
||||
</div>
|
||||
<div id="fv-truncated" style="display:none;font-size:12px;color:var(--yellow);margin-bottom:8px"></div>
|
||||
<pre id="fv-content"
|
||||
style="margin:0;overflow:auto;flex:1;background:var(--bg3);border:1px solid var(--border);
|
||||
border-radius:4px;padding:12px 14px;font-family:var(--mono);font-size:12px;
|
||||
line-height:1.6;white-space:pre-wrap;word-break:break-all;max-height:70vh"></pre>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user