- Streaming chat sidebar with OpenAI-compatible API client - Path-referencing context injection via MCP tools - Dark theme styling with Obsidian CSS variables - Settings: gateway URL, API key, context/model toggles - SSE streaming with fetch timeout protection - Session continuity via X-Hermes-Session-Id headers
139 lines
No EOL
2.7 KiB
CSS
139 lines
No EOL
2.7 KiB
CSS
/* ==========================================================================
|
|
Hermes Chat — Dark Theme
|
|
Uses Obsidian CSS variables for native theme compatibility.
|
|
========================================================================== */
|
|
|
|
/* --- Container --- */
|
|
.hermes-chat-container {
|
|
display: flex;
|
|
flex-direction: column;
|
|
height: 100%;
|
|
}
|
|
|
|
/* --- Message list --- */
|
|
.chat-messages {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 1rem;
|
|
}
|
|
|
|
.chat-message {
|
|
margin-bottom: 1rem;
|
|
padding: 0.5rem 1rem;
|
|
border-radius: 8px;
|
|
line-height: 1.45;
|
|
}
|
|
|
|
.chat-message-user {
|
|
background: var(--background-modifier-hover);
|
|
text-align: right;
|
|
}
|
|
|
|
.chat-message-assistant {
|
|
background: var(--background-secondary);
|
|
}
|
|
|
|
/* --- Message internals --- */
|
|
.chat-message-role {
|
|
font-size: 0.75rem;
|
|
opacity: 0.6;
|
|
margin-bottom: 0.25rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.chat-message-content {
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
color: var(--text-normal);
|
|
}
|
|
|
|
/* --- Loading indicator --- */
|
|
.chat-loading {
|
|
opacity: 0.6;
|
|
font-style: italic;
|
|
padding: 0.5rem 1rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* --- Input area --- */
|
|
.chat-input-area {
|
|
display: flex;
|
|
padding: 0.5rem;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.chat-input-area textarea {
|
|
flex: 1;
|
|
background: var(--background-primary);
|
|
color: var(--text-normal);
|
|
border: 1px solid var(--background-modifier-border);
|
|
border-radius: 4px;
|
|
resize: none;
|
|
min-height: 40px;
|
|
max-height: 120px;
|
|
padding: 0.5rem;
|
|
font-family: inherit;
|
|
font-size: 0.9rem;
|
|
outline: none;
|
|
transition: border-color 0.15s;
|
|
}
|
|
|
|
.chat-input-area textarea:focus {
|
|
border-color: var(--interactive-accent);
|
|
}
|
|
|
|
.chat-input-area textarea:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.chat-input-area button {
|
|
flex-shrink: 0;
|
|
margin-left: 0;
|
|
cursor: pointer;
|
|
padding: 0.5rem 1rem;
|
|
background: var(--interactive-accent);
|
|
color: var(--text-on-accent);
|
|
border: none;
|
|
border-radius: 4px;
|
|
font-size: 0.85rem;
|
|
font-weight: 500;
|
|
transition: background 0.15s;
|
|
}
|
|
|
|
.chat-input-area button:hover {
|
|
background: var(--interactive-accent-hover);
|
|
}
|
|
|
|
.chat-input-area button:disabled {
|
|
opacity: 0.5;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
/* --- Status bar --- */
|
|
.chat-status-bar {
|
|
font-size: 0.7rem;
|
|
opacity: 0.5;
|
|
padding: 0.25rem 1rem;
|
|
border-top: 1px solid var(--background-modifier-border);
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
/* --- Scrollbar (thin, dark) --- */
|
|
.chat-messages::-webkit-scrollbar {
|
|
width: 6px;
|
|
}
|
|
|
|
.chat-messages::-webkit-scrollbar-track {
|
|
background: transparent;
|
|
}
|
|
|
|
.chat-messages::-webkit-scrollbar-thumb {
|
|
background: var(--background-modifier-border);
|
|
border-radius: 3px;
|
|
}
|
|
|
|
.chat-messages::-webkit-scrollbar-thumb:hover {
|
|
background: var(--text-muted);
|
|
} |