Add in-app debug log panel and rich vault search

- Add listener/history API to Logger for live log streaming
- Add toggle button and styled log panel to chat view
- Enhance ToolExecutor to use VaultIndexer for rich search results
- Instruct all agent modes to emit tool calls immediately instead of describing intent
This commit is contained in:
2026-05-21 09:37:46 +02:00
parent 68ac64cc02
commit 5350df92dd
7 changed files with 537 additions and 68 deletions
+84
View File
@@ -4,6 +4,11 @@
--ollama-border: var(--background-modifier-border);
--ollama-radius: var(--radius-m);
--ollama-gap: var(--size-4-2);
--ollama-log-debug: var(--text-muted);
--ollama-log-info: var(--text-accent);
--ollama-log-warn: var(--text-warning);
--ollama-log-error: var(--text-error);
--ollama-log-bg: var(--background-primary-alt);
}
.ollama-chat-container {
@@ -297,3 +302,82 @@
outline: none;
border-color: var(--interactive-accent);
}
/* Show Logs Button */
.ollama-show-logs-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-show-logs-button:hover {
background-color: var(--background-modifier-hover);
}
/* Logs Panel */
.ollama-logs-container {
display: flex;
flex-direction: column;
gap: 2px;
padding: var(--size-4-1) var(--size-4-2);
max-height: 12rem;
overflow-y: auto;
background-color: var(--ollama-log-bg);
border-top: 1px solid var(--ollama-border);
border-bottom: 1px solid var(--ollama-border);
font-family: var(--font-monospace);
font-size: var(--font-smallest);
}
.ollama-log-row {
display: flex;
gap: var(--size-4-1);
align-items: baseline;
line-height: var(--line-height-tight);
}
.ollama-log-time {
color: var(--text-faint);
flex-shrink: 0;
}
.ollama-log-level {
flex-shrink: 0;
font-weight: var(--font-semibold);
text-transform: uppercase;
min-width: 3em;
}
.ollama-log-level-debug {
color: var(--ollama-log-debug);
}
.ollama-log-level-info {
color: var(--ollama-log-info);
}
.ollama-log-level-warn {
color: var(--ollama-log-warn);
}
.ollama-log-level-error {
color: var(--ollama-log-error);
}
.ollama-log-category {
color: var(--text-muted);
flex-shrink: 0;
}
.ollama-log-message {
color: var(--text-normal);
word-break: break-word;
}