Simplify chat UI and wire memory context

This commit is contained in:
2026-05-20 23:35:38 +08:00
parent 3d815d3ae3
commit 061cc9225a
8 changed files with 437 additions and 73 deletions
+56 -38
View File
@@ -17,13 +17,16 @@
</div>
</div>
<nav class="side-nav" aria-label="DuckLM sections">
<a href="/" class="active">Chat</a>
<a href="/approvals">Approvals</a>
<a href="/skills">Skills</a>
<a href="/memory">Memory</a>
<a href="/experience">Experience</a>
</nav>
<details class="utility-menu">
<summary>System</summary>
<nav class="side-nav" aria-label="DuckLM sections">
<a href="/" class="active">Chat</a>
<a href="/approvals">Approvals</a>
<a href="/skills">Skills</a>
<a href="/memory">Memory</a>
<a href="/experience">Experience</a>
</nav>
</details>
<section class="conversation-panel" aria-labelledby="conversations-title">
<div class="panel-heading">
@@ -41,7 +44,7 @@
</label>
<label class="toggle-row">
<input id="debug" type="checkbox" checked>
<span>Show reasoning and events</span>
<span>Debug mode</span>
</label>
</section>
@@ -70,7 +73,10 @@
<h2 id="chat-title">Chat</h2>
<p id="chat-subtitle">Messages are processed by the local Qwen role mapping through Duck Core.</p>
</div>
<button id="reload-chat" class="secondary-button" type="button">Reload</button>
<div class="header-actions">
<button id="activity-open" class="secondary-button" type="button">Activity</button>
<button id="reload-chat" class="secondary-button" type="button">Reload</button>
</div>
</header>
<section id="messages" class="messages" aria-live="polite">
@@ -86,35 +92,6 @@
</article>
</section>
<section id="debug-panel" class="debug-panel">
<div class="debug-column">
<h3>Event Timeline</h3>
<ol id="events"></ol>
</div>
<div class="debug-column audit-column">
<div class="debug-heading">
<h3>Command Audit</h3>
<button id="refresh-audit" class="mini-button" type="button">Refresh</button>
</div>
<div id="command-audit" class="audit-list"></div>
</div>
<div class="debug-column memory-column">
<div class="debug-heading">
<h3>Workspace Memory</h3>
<button id="refresh-memory" class="mini-button" type="button">Refresh</button>
</div>
<form id="memory-form" class="memory-form">
<input id="memory-text" placeholder="Add memory for this workspace" autocomplete="off">
<button type="submit">Add</button>
</form>
<div class="memory-search-row">
<input id="memory-search-inline" placeholder="Search memory" autocomplete="off">
<button id="memory-search-button" class="mini-button" type="button">Search</button>
</div>
<div id="memory-list" class="memory-list"></div>
</div>
</section>
<form id="composer" class="composer">
<textarea id="message" rows="3" placeholder="Напиши сообщение DuckLM...">Скажи коротко, что ты DuckLM</textarea>
<div class="composer-actions">
@@ -123,6 +100,47 @@
</div>
</form>
</main>
<div id="activity-backdrop" class="activity-backdrop" hidden></div>
<aside id="activity-drawer" class="activity-drawer" aria-label="Activity" hidden>
<header class="drawer-header">
<div>
<h2>Activity</h2>
<p>Task details, command audit, and memory.</p>
</div>
<button id="activity-close" class="icon-button" type="button" aria-label="Close activity">x</button>
</header>
<div class="drawer-tabs" role="tablist" aria-label="Activity sections">
<button class="drawer-tab active" type="button" data-activity-tab="events">Events</button>
<button class="drawer-tab" type="button" data-activity-tab="commands">Commands</button>
<button class="drawer-tab" type="button" data-activity-tab="memory">Memory</button>
</div>
<section class="drawer-section active" data-activity-panel="events">
<ol id="events"></ol>
</section>
<section class="drawer-section" data-activity-panel="commands">
<div class="debug-heading">
<h3>Command Audit</h3>
<button id="refresh-audit" class="mini-button" type="button">Refresh</button>
</div>
<div id="command-audit" class="audit-list"></div>
</section>
<section class="drawer-section" data-activity-panel="memory">
<div class="debug-heading">
<h3>Memory</h3>
<button id="refresh-memory" class="mini-button" type="button">Refresh</button>
</div>
<form id="memory-form" class="memory-form">
<input id="memory-text" placeholder="Add memory" autocomplete="off">
<button type="submit">Add</button>
</form>
<div class="memory-search-row">
<input id="memory-search-inline" placeholder="Search memory" autocomplete="off">
<button id="memory-search-button" class="mini-button" type="button">Search</button>
</div>
<div id="memory-list" class="memory-list"></div>
</section>
</aside>
</div>
<script src="/static/app.js"></script>
</body>