Add chat session history with dropdown UI

Implement persistent chat history using a new ChatHistoryManager class.
Sessions are saved on view close, restored on open, and selectable via a
dropdown in the chat header. Includes delete and clear-all commands,
with automatic title generation from the first user message.
This commit is contained in:
2026-05-21 10:36:55 +02:00
parent 5c2078aebb
commit e7b753014c
7 changed files with 566 additions and 7 deletions
+38
View File
@@ -303,6 +303,44 @@
border-color: var(--interactive-accent);
}
/* Chat History Selector */
.ollama-history-selector {
padding: var(--size-4-1) var(--size-4-2);
border-radius: var(--ollama-radius);
border: 1px solid var(--ollama-border);
background-color: var(--background-modifier-form-field);
color: var(--text-normal);
font-size: var(--font-ui-small);
cursor: pointer;
max-width: 12rem;
overflow: hidden;
text-overflow: ellipsis;
}
.ollama-history-selector:focus {
outline: none;
border-color: var(--interactive-accent);
}
.ollama-history-delete-button {
display: inline-flex;
align-items: center;
gap: var(--size-4-1);
padding: var(--size-4-1) var(--size-4-2);
font-size: var(--font-smallest);
border-radius: var(--ollama-radius);
border: 1px solid var(--ollama-border);
background-color: var(--background-modifier-form-field);
color: var(--text-normal);
cursor: pointer;
transition: background-color 0.15s ease;
}
.ollama-history-delete-button:hover {
background-color: var(--background-modifier-error-hover);
color: var(--text-error);
}
/* Show Logs Button */
.ollama-show-logs-button {
display: inline-flex;