feat: persistent chat history with clear button
- Add dashboard/store.py: MessageLog dataclass singleton tracking user/agent/error messages for the lifetime of the server process - agents.py: write each chat turn to MessageLog; add GET and DELETE /agents/timmy/history routes returning the history.html partial - partials/history.html: render stored messages by role (YOU / TIMMY / SYSTEM); falls back to the Mission Control init message when empty - index.html: chat-log loads history via hx-get on page start; new CLEAR button in panel header sends hx-delete to reset the log - style.css: add .mc-btn-clear (muted, red-on-hover for the header) - tests: autouse reset_message_log fixture in conftest; 5 new history tests covering empty state, recording, offline errors, clear, and post-clear state → 32 tests total, all passing https://claude.ai/code/session_01KZMfwBpLuiv6x9GbzTqbys
This commit is contained in:
@@ -204,6 +204,22 @@ body {
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.mc-btn-clear {
|
||||
background: transparent;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 2px;
|
||||
color: var(--text-dim);
|
||||
font-family: var(--font);
|
||||
font-size: 9px;
|
||||
font-weight: 700;
|
||||
padding: 3px 8px;
|
||||
letter-spacing: 0.12em;
|
||||
cursor: pointer;
|
||||
transition: border-color 0.15s, color 0.15s;
|
||||
touch-action: manipulation;
|
||||
}
|
||||
.mc-btn-clear:hover { border-color: var(--red); color: var(--red); }
|
||||
|
||||
/* Bootstrap form-control overrides */
|
||||
.mc-input {
|
||||
background: var(--bg-deep) !important;
|
||||
|
||||
Reference in New Issue
Block a user