mirror of
https://github.com/infinition/Bjorn.git
synced 2026-03-17 09:31:04 +00:00
Add LLM configuration and MCP server management UI and backend functionality
- Implemented a new SPA page for LLM Bridge and MCP Server settings in `llm-config.js`. - Added functionality for managing LLM and MCP configurations, including toggling, saving settings, and testing connections. - Created HTTP endpoints in `llm_utils.py` for handling LLM chat, status checks, and MCP server configuration. - Integrated model fetching from LaRuche and Ollama backends. - Enhanced error handling and logging for better debugging and user feedback.
This commit is contained in:
@@ -17,3 +17,4 @@
|
||||
@import url("./pages/sentinel.css");
|
||||
@import url("./pages/bifrost.css");
|
||||
@import url("./pages/loki.css");
|
||||
@import url("./pages/llm.css");
|
||||
|
||||
425
web/css/pages/llm.css
Normal file
425
web/css/pages/llm.css
Normal file
@@ -0,0 +1,425 @@
|
||||
/* ==========================================================================
|
||||
llm.css — LLM Chat & LLM Config SPA pages
|
||||
========================================================================== */
|
||||
|
||||
/* ── LLM Chat ─────────────────────────────────────────────────────────── */
|
||||
|
||||
.llmc-page {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: calc(100vh - var(--h-topbar, 56px) - var(--h-bottombar, 56px));
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
background: var(--bg);
|
||||
color: var(--ink);
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.llmc-header {
|
||||
background: var(--c-panel);
|
||||
border-bottom: 1px solid var(--c-border);
|
||||
padding: 10px 16px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.llmc-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: var(--muted-off);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.llmc-dot.online { background: var(--ok); }
|
||||
.llmc-dot.offline { background: var(--danger); }
|
||||
|
||||
.llmc-title {
|
||||
font-size: 13px;
|
||||
color: var(--acid);
|
||||
letter-spacing: 2px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.llmc-status {
|
||||
font-size: 11px;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.llmc-btn-ghost {
|
||||
background: transparent;
|
||||
border: 1px solid var(--c-border);
|
||||
color: var(--muted);
|
||||
padding: 3px 10px;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
transition: border-color .15s, color .15s;
|
||||
}
|
||||
.llmc-btn-ghost:hover { border-color: var(--acid); color: var(--ink); }
|
||||
.llmc-btn-ghost.active { border-color: var(--accent-2); color: var(--accent-2); background: color-mix(in oklab, var(--accent-2) 8%, transparent); }
|
||||
|
||||
.llmc-clear-btn { margin-left: auto; }
|
||||
|
||||
.llmc-messages {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 14px 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.llmc-msg {
|
||||
max-width: 88%;
|
||||
padding: 9px 13px;
|
||||
border-radius: 4px;
|
||||
font-size: 12px;
|
||||
line-height: 1.55;
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
.llmc-msg.user {
|
||||
background: color-mix(in oklab, var(--ok) 8%, transparent);
|
||||
border: 1px solid color-mix(in oklab, var(--ok) 25%, transparent);
|
||||
align-self: flex-end;
|
||||
color: color-mix(in oklab, var(--ok) 85%, var(--ink) 15%);
|
||||
}
|
||||
.llmc-msg.assistant {
|
||||
background: color-mix(in oklab, var(--accent-2) 6%, transparent);
|
||||
border: 1px solid color-mix(in oklab, var(--accent-2) 20%, transparent);
|
||||
align-self: flex-start;
|
||||
}
|
||||
.llmc-msg.system {
|
||||
background: transparent;
|
||||
border: 1px dashed var(--c-border);
|
||||
align-self: center;
|
||||
color: var(--muted);
|
||||
font-size: 11px;
|
||||
padding: 5px 12px;
|
||||
}
|
||||
|
||||
.llmc-msg-role {
|
||||
font-size: 10px;
|
||||
color: var(--muted);
|
||||
margin-bottom: 3px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.llmc-msg.user .llmc-msg-role { color: color-mix(in oklab, var(--ok) 70%, var(--muted)); }
|
||||
.llmc-msg.assistant .llmc-msg-role { color: var(--acid); }
|
||||
|
||||
.llmc-thinking {
|
||||
align-self: flex-start;
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
padding: 6px 16px;
|
||||
border-left: 2px solid var(--danger);
|
||||
font-family: 'Courier New', monospace;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.llmc-disabled-msg {
|
||||
text-align: center;
|
||||
padding: 20px;
|
||||
color: var(--muted);
|
||||
font-size: 12px;
|
||||
}
|
||||
.llmc-disabled-msg a { color: var(--acid); }
|
||||
|
||||
.llmc-input-row {
|
||||
background: var(--c-panel);
|
||||
border-top: 1px solid var(--c-border);
|
||||
padding: 10px 12px;
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.llmc-input {
|
||||
flex: 1;
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--c-border);
|
||||
color: var(--ink);
|
||||
padding: 9px 12px;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-size: 12px;
|
||||
resize: none;
|
||||
outline: none;
|
||||
height: 44px;
|
||||
max-height: 120px;
|
||||
overflow-y: auto;
|
||||
}
|
||||
.llmc-input:focus { border-color: var(--acid); }
|
||||
|
||||
.llmc-send-btn {
|
||||
background: var(--danger);
|
||||
border: none;
|
||||
color: white;
|
||||
padding: 0 16px;
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
font-family: inherit;
|
||||
letter-spacing: 1px;
|
||||
transition: background .15s;
|
||||
}
|
||||
.llmc-send-btn:hover { background: color-mix(in oklab, var(--danger) 80%, white 20%); }
|
||||
.llmc-send-btn:disabled { background: var(--muted-off); cursor: not-allowed; }
|
||||
|
||||
/* ── LLM Config ───────────────────────────────────────────────────────── */
|
||||
|
||||
.llmcfg-page {
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
color: var(--ink);
|
||||
background: var(--bg);
|
||||
min-height: calc(100vh - var(--h-topbar, 56px) - var(--h-bottombar, 56px));
|
||||
}
|
||||
|
||||
.llmcfg-header {
|
||||
background: var(--c-panel);
|
||||
border-bottom: 1px solid var(--c-border);
|
||||
padding: 12px 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.llmcfg-title {
|
||||
font-size: 13px;
|
||||
color: var(--acid);
|
||||
letter-spacing: 2px;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.llmcfg-nav-link {
|
||||
margin-left: auto;
|
||||
color: var(--muted);
|
||||
text-decoration: none;
|
||||
font-size: 11px;
|
||||
}
|
||||
.llmcfg-nav-link:hover { color: var(--ink); }
|
||||
|
||||
.llmcfg-container {
|
||||
max-width: 780px;
|
||||
margin: 0 auto;
|
||||
padding: 20px 16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 18px;
|
||||
}
|
||||
|
||||
.llmcfg-section {
|
||||
background: var(--c-panel);
|
||||
border: 1px solid var(--c-border);
|
||||
border-radius: 4px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.llmcfg-section-title {
|
||||
padding: 10px 14px;
|
||||
background: var(--c-panel-2);
|
||||
border-bottom: 1px solid var(--c-border);
|
||||
font-size: 11px;
|
||||
letter-spacing: 2px;
|
||||
color: var(--acid);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.llmcfg-badge {
|
||||
font-size: 10px;
|
||||
padding: 1px 8px;
|
||||
border-radius: 2px;
|
||||
}
|
||||
.llmcfg-badge.on { background: var(--ok); color: #000; }
|
||||
.llmcfg-badge.off { background: var(--c-border); color: var(--muted); }
|
||||
|
||||
.llmcfg-body {
|
||||
padding: 14px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.llmcfg-subsection-title {
|
||||
font-size: 10px;
|
||||
letter-spacing: 2px;
|
||||
color: var(--muted);
|
||||
border-top: 1px solid var(--c-border);
|
||||
padding-top: 10px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.llmcfg-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.llmcfg-label {
|
||||
font-size: 10px;
|
||||
color: var(--muted);
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.llmcfg-input,
|
||||
.llmcfg-select {
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--c-border);
|
||||
color: var(--ink);
|
||||
padding: 7px 10px;
|
||||
font-family: inherit;
|
||||
font-size: 11px;
|
||||
outline: none;
|
||||
width: 100%;
|
||||
}
|
||||
.llmcfg-input:focus,
|
||||
.llmcfg-select:focus { border-color: var(--acid); }
|
||||
.llmcfg-input[type="password"] { letter-spacing: 2px; }
|
||||
|
||||
.llmcfg-row {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
}
|
||||
.llmcfg-row .llmcfg-field { flex: 1; }
|
||||
|
||||
.llmcfg-toggle-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 10px;
|
||||
}
|
||||
.llmcfg-toggle-label {
|
||||
font-size: 12px;
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.llmcfg-toggle {
|
||||
position: relative;
|
||||
width: 44px;
|
||||
height: 24px;
|
||||
flex-shrink: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
.llmcfg-toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
|
||||
.llmcfg-slider {
|
||||
position: absolute;
|
||||
inset: 0;
|
||||
background: var(--c-border-strong);
|
||||
transition: .2s;
|
||||
cursor: pointer;
|
||||
}
|
||||
.llmcfg-slider::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
height: 18px;
|
||||
width: 18px;
|
||||
left: 3px;
|
||||
top: 3px;
|
||||
background: var(--muted-off);
|
||||
transition: .2s;
|
||||
}
|
||||
.llmcfg-toggle input:checked + .llmcfg-slider { background: var(--danger); }
|
||||
.llmcfg-toggle input:checked + .llmcfg-slider::before { transform: translateX(20px); background: white; }
|
||||
|
||||
.llmcfg-tools-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
||||
gap: 7px;
|
||||
padding-top: 4px;
|
||||
}
|
||||
.llmcfg-tool-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 7px;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
color: var(--ink);
|
||||
}
|
||||
.llmcfg-tool-item input[type="checkbox"] { accent-color: var(--acid); }
|
||||
|
||||
.llmcfg-status-row {
|
||||
font-size: 11px;
|
||||
color: var(--muted);
|
||||
border-top: 1px solid var(--c-border);
|
||||
padding-top: 8px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.llmcfg-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.llmcfg-btn {
|
||||
padding: 7px 16px;
|
||||
font-family: inherit;
|
||||
font-size: 11px;
|
||||
cursor: pointer;
|
||||
border: 1px solid var(--c-border);
|
||||
background: transparent;
|
||||
color: var(--ink);
|
||||
letter-spacing: 1px;
|
||||
transition: border-color .15s, color .15s;
|
||||
}
|
||||
.llmcfg-btn:hover { border-color: var(--acid); color: var(--acid); }
|
||||
.llmcfg-btn.primary { background: var(--danger); border-color: var(--danger); color: white; }
|
||||
.llmcfg-btn.primary:hover { background: color-mix(in oklab, var(--danger) 80%, white 20%); border-color: inherit; color: white; }
|
||||
.llmcfg-btn.compact { padding: 5px 10px; flex-shrink: 0; }
|
||||
|
||||
/* LaRuche discovery row */
|
||||
.llmcfg-url-row { display: flex; gap: 6px; align-items: center; }
|
||||
.llmcfg-url-row .llmcfg-input { flex: 1; }
|
||||
|
||||
/* Model selector row */
|
||||
.llmcfg-model-row { display: flex; gap: 6px; align-items: center; }
|
||||
.llmcfg-model-row .llmcfg-select { flex: 1; }
|
||||
|
||||
.llmcfg-discovery-row {
|
||||
font-size: 11px;
|
||||
padding: 4px 0;
|
||||
min-height: 18px;
|
||||
}
|
||||
.llmcfg-disc-found { color: var(--ok); }
|
||||
.llmcfg-disc-searching { color: var(--muted); }
|
||||
.llmcfg-disc-off { color: var(--danger); opacity: .7; }
|
||||
|
||||
/* LaRuche default model info */
|
||||
.llmcfg-laruche-default {
|
||||
font-size: 11px;
|
||||
padding: 2px 0 0;
|
||||
min-height: 14px;
|
||||
}
|
||||
.llmcfg-laruche-default-label {
|
||||
color: var(--muted);
|
||||
}
|
||||
.llmcfg-laruche-default-value {
|
||||
color: #facc15;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
/* Personality & Prompts textarea */
|
||||
.llmcfg-textarea {
|
||||
width: 100%;
|
||||
min-height: 70px;
|
||||
resize: vertical;
|
||||
background: var(--bg);
|
||||
border: 1px solid var(--c-border);
|
||||
border-radius: 4px;
|
||||
color: var(--ink);
|
||||
padding: 7px 10px;
|
||||
font-family: 'Courier New', Courier, monospace;
|
||||
font-size: 0.75rem;
|
||||
line-height: 1.4;
|
||||
}
|
||||
.llmcfg-textarea:focus { border-color: var(--acid); }
|
||||
.llmcfg-textarea::placeholder { color: var(--muted); opacity: 0.5; font-size: 0.65rem; }
|
||||
.llmcfg-reset-btn {
|
||||
margin-top: 4px;
|
||||
font-size: 0.6rem;
|
||||
padding: 2px 8px;
|
||||
opacity: 0.6;
|
||||
}
|
||||
.llmcfg-reset-btn:hover { opacity: 1; }
|
||||
@@ -291,6 +291,42 @@
|
||||
background: var(--c-cancel);
|
||||
}
|
||||
|
||||
/* Origin badge — who queued this action */
|
||||
.scheduler-container .originBadge {
|
||||
display: inline-block;
|
||||
font-size: .68rem;
|
||||
letter-spacing: .5px;
|
||||
padding: .1rem .5rem;
|
||||
border-radius: 2px;
|
||||
font-weight: 600;
|
||||
margin-bottom: .2rem;
|
||||
}
|
||||
.scheduler-container .origin-llm {
|
||||
background: color-mix(in oklab, var(--danger) 18%, transparent);
|
||||
color: var(--danger);
|
||||
border: 1px solid color-mix(in oklab, var(--danger) 35%, transparent);
|
||||
}
|
||||
.scheduler-container .origin-ai {
|
||||
background: color-mix(in oklab, var(--accent-2, #a78bfa) 15%, transparent);
|
||||
color: var(--accent-2, #a78bfa);
|
||||
border: 1px solid color-mix(in oklab, var(--accent-2, #a78bfa) 30%, transparent);
|
||||
}
|
||||
.scheduler-container .origin-mcp {
|
||||
background: color-mix(in oklab, var(--acid) 12%, transparent);
|
||||
color: var(--acid);
|
||||
border: 1px solid color-mix(in oklab, var(--acid) 25%, transparent);
|
||||
}
|
||||
.scheduler-container .origin-manual {
|
||||
background: color-mix(in oklab, var(--ok) 12%, transparent);
|
||||
color: var(--ok);
|
||||
border: 1px solid color-mix(in oklab, var(--ok) 25%, transparent);
|
||||
}
|
||||
.scheduler-container .origin-heuristic {
|
||||
background: color-mix(in oklab, var(--muted) 12%, transparent);
|
||||
color: var(--muted);
|
||||
border: 1px solid color-mix(in oklab, var(--muted) 25%, transparent);
|
||||
}
|
||||
|
||||
/* Collapsed */
|
||||
.scheduler-container .card.collapsed .kv,
|
||||
.scheduler-container .card.collapsed .tags,
|
||||
@@ -334,8 +370,7 @@
|
||||
height: 80px;
|
||||
object-fit: contain;
|
||||
border-radius: 6px;
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--c-border);
|
||||
|
||||
}
|
||||
|
||||
.scheduler-container .card.status-running .actionIcon {
|
||||
|
||||
@@ -364,3 +364,32 @@
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
/* ── AI Sentinel elements ─────────────────────────────── */
|
||||
.sentinel-ai-btn {
|
||||
background: rgba(168, 85, 247, .1) !important;
|
||||
border-color: rgba(168, 85, 247, .3) !important;
|
||||
color: #c084fc !important;
|
||||
}
|
||||
.sentinel-ai-btn:hover {
|
||||
background: rgba(168, 85, 247, .2) !important;
|
||||
}
|
||||
.sentinel-ai-result {
|
||||
margin: 4px 0 0;
|
||||
padding: 6px 8px;
|
||||
background: rgba(168, 85, 247, .06);
|
||||
border: 1px solid rgba(168, 85, 247, .15);
|
||||
border-radius: 4px;
|
||||
font-size: 0.7rem;
|
||||
white-space: pre-wrap;
|
||||
line-height: 1.4;
|
||||
display: none;
|
||||
}
|
||||
.sentinel-ai-result.active { display: block; }
|
||||
.sentinel-ai-summary {
|
||||
padding: 8px;
|
||||
background: rgba(59, 130, 246, .06);
|
||||
border: 1px solid rgba(59, 130, 246, .15);
|
||||
border-radius: 6px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
@@ -404,6 +404,41 @@ body.console-docked .app-container {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
/* Bjorn comment lines */
|
||||
.comment-line {
|
||||
color: #4ade80;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 5px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
.comment-icon {
|
||||
display: inline-block;
|
||||
width: 1.15em;
|
||||
height: 1.15em;
|
||||
flex-shrink: 0;
|
||||
opacity: .85;
|
||||
vertical-align: middle;
|
||||
object-fit: contain;
|
||||
}
|
||||
.comment-status {
|
||||
opacity: .55;
|
||||
font-size: .9em;
|
||||
}
|
||||
.comment-llm-badge {
|
||||
display: inline-block;
|
||||
font-size: .7em;
|
||||
font-weight: 700;
|
||||
letter-spacing: .5px;
|
||||
padding: 1px 5px;
|
||||
border-radius: 4px;
|
||||
background: linear-gradient(180deg, rgba(168,85,247,.35), rgba(168,85,247,.2));
|
||||
border: 1px solid rgba(168,85,247,.5);
|
||||
color: #c4b5fd;
|
||||
vertical-align: middle;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
/* Console font slider row */
|
||||
.console-fontrow {
|
||||
flex-basis: 100%;
|
||||
@@ -723,17 +758,121 @@ body.console-docked .app-container {
|
||||
transform: scale(.96);
|
||||
}
|
||||
|
||||
/* QuickPanel rows & signal */
|
||||
/* ---- QuickPanel Tab Bar ---- */
|
||||
.qp-tabs {
|
||||
display: flex;
|
||||
gap: 0;
|
||||
margin: 0 16px 12px;
|
||||
border-bottom: 1px solid var(--c-border);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.qp-tab {
|
||||
padding: 8px 20px;
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
color: var(--muted);
|
||||
cursor: pointer;
|
||||
border-bottom: 2px solid transparent;
|
||||
transition: color .2s ease, border-color .2s ease;
|
||||
user-select: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.qp-tab:hover {
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.qp-tab.active {
|
||||
color: var(--acid);
|
||||
border-bottom-color: var(--acid);
|
||||
}
|
||||
|
||||
.qp-tab-icon {
|
||||
font-size: 15px;
|
||||
opacity: .7;
|
||||
}
|
||||
|
||||
.qp-tab.active .qp-tab-icon {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* ---- QuickPanel rows & cards ---- */
|
||||
.qprow {
|
||||
display: grid;
|
||||
gap: 10px;
|
||||
padding: 10px;
|
||||
padding: 12px;
|
||||
border: 1px solid var(--c-border);
|
||||
border-radius: 10px;
|
||||
background: var(--grad-qprow);
|
||||
border-radius: 12px;
|
||||
background: var(--grad-qprow, color-mix(in oklab, var(--c-panel, #0d1520) 80%, transparent));
|
||||
margin-bottom: 6px;
|
||||
transition: transform .15s ease, box-shadow .15s ease, opacity .15s ease, border-color .15s ease;
|
||||
animation: qpSlideIn .25s ease forwards;
|
||||
animation-delay: calc(var(--i, 0) * 40ms);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.qprow:hover {
|
||||
border-color: var(--c-border-strong, var(--c-border));
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,.2);
|
||||
}
|
||||
|
||||
.qprow.connected {
|
||||
border-left: 3px solid var(--acid);
|
||||
}
|
||||
|
||||
@keyframes qpSlideIn {
|
||||
from { transform: translateY(8px); opacity: 0; }
|
||||
to { transform: translateY(0); opacity: 1; }
|
||||
}
|
||||
|
||||
/* ---- WiFi card layout ---- */
|
||||
.wifi-card {
|
||||
grid-template-columns: 1fr auto;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.wifi-card-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
overflow: hidden;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.wifi-card-ssid {
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.wifi-card-meta {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.wifi-card-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.wifi-connected-chip {
|
||||
font-size: 11px;
|
||||
color: var(--acid);
|
||||
font-weight: 600;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
/* ---- Signal bars ---- */
|
||||
.sig {
|
||||
display: inline-grid;
|
||||
grid-auto-flow: column;
|
||||
@@ -742,19 +881,124 @@ body.console-docked .app-container {
|
||||
}
|
||||
|
||||
.sig i {
|
||||
width: 4px;
|
||||
width: 5px;
|
||||
height: 6px;
|
||||
display: block;
|
||||
background: var(--c-slot);
|
||||
border: 1px solid var(--c-border);
|
||||
border-bottom: none;
|
||||
border-radius: 2px 2px 0 0;
|
||||
transition: background .2s ease;
|
||||
}
|
||||
|
||||
.sig i.on {
|
||||
background: var(--acid);
|
||||
}
|
||||
|
||||
/* ---- Known network cards ---- */
|
||||
.known-card {
|
||||
grid-template-columns: auto 1fr auto;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.known-card-grip {
|
||||
cursor: grab;
|
||||
color: var(--muted);
|
||||
font-size: 16px;
|
||||
padding: 4px 2px;
|
||||
user-select: none;
|
||||
touch-action: none;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.known-card-grip:active {
|
||||
cursor: grabbing;
|
||||
}
|
||||
|
||||
.known-card-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
overflow: hidden;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.known-card-ssid {
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.known-card-priority {
|
||||
font-size: 11px;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.known-card-actions {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* ---- Drag & Drop ---- */
|
||||
.qprow.dragging {
|
||||
opacity: .4;
|
||||
transform: scale(.97);
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.drag-placeholder {
|
||||
height: 3px;
|
||||
background: var(--acid);
|
||||
border-radius: 99px;
|
||||
margin: 2px 0;
|
||||
box-shadow: 0 0 8px color-mix(in oklab, var(--acid) 50%, transparent);
|
||||
animation: qpSlideIn .15s ease forwards;
|
||||
}
|
||||
|
||||
/* ---- Multi-select ---- */
|
||||
.known-select-cb {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
accent-color: var(--acid);
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.edit-mode .known-select-cb {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.edit-mode .known-card-grip {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.qp-batch-bar {
|
||||
position: sticky;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
padding: 10px 16px;
|
||||
background: color-mix(in oklab, var(--c-panel, #0d1520) 95%, transparent);
|
||||
backdrop-filter: blur(8px);
|
||||
border-top: 1px solid var(--c-border-strong);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 8px;
|
||||
animation: qpSlideUp .2s ease forwards;
|
||||
z-index: 5;
|
||||
}
|
||||
|
||||
@keyframes qpSlideUp {
|
||||
from { transform: translateY(100%); opacity: 0; }
|
||||
to { transform: translateY(0); opacity: 1; }
|
||||
}
|
||||
|
||||
/* ---- Bluetooth cards ---- */
|
||||
.btlist .qprow {
|
||||
grid-template-columns: 1fr auto;
|
||||
}
|
||||
@@ -763,6 +1007,78 @@ body.console-docked .app-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.bt-icon {
|
||||
font-size: 20px;
|
||||
flex-shrink: 0;
|
||||
width: 32px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.bt-device-info {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2px;
|
||||
overflow: hidden;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.bt-device-name {
|
||||
font-weight: 600;
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.bt-device-mac {
|
||||
font-size: 11px;
|
||||
color: var(--muted);
|
||||
font-family: monospace;
|
||||
}
|
||||
|
||||
.bt-state-chips {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.bt-chip {
|
||||
font-size: 10px;
|
||||
padding: 1px 6px;
|
||||
border-radius: 99px;
|
||||
font-weight: 600;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 3px;
|
||||
}
|
||||
|
||||
.bt-chip-paired {
|
||||
background: color-mix(in oklab, var(--acid-2, #18f0ff) 14%, transparent);
|
||||
border: 1px solid color-mix(in oklab, var(--acid-2, #18f0ff) 40%, transparent);
|
||||
color: var(--acid-2, #18f0ff);
|
||||
}
|
||||
|
||||
.bt-chip-trusted {
|
||||
background: color-mix(in oklab, var(--ok, #2cff7e) 14%, transparent);
|
||||
border: 1px solid color-mix(in oklab, var(--ok, #2cff7e) 40%, transparent);
|
||||
color: var(--ok, #2cff7e);
|
||||
}
|
||||
|
||||
.bt-chip-connected {
|
||||
background: color-mix(in oklab, var(--acid) 14%, transparent);
|
||||
border: 1px solid color-mix(in oklab, var(--acid) 40%, transparent);
|
||||
color: var(--acid);
|
||||
}
|
||||
|
||||
.bt-actions {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.bt-type {
|
||||
@@ -770,6 +1086,105 @@ body.console-docked .app-container {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* ---- State dot ---- */
|
||||
.state-dot {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
display: inline-block;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.state-on {
|
||||
background: var(--acid);
|
||||
box-shadow: 0 0 6px color-mix(in oklab, var(--acid) 60%, transparent);
|
||||
}
|
||||
|
||||
.state-off {
|
||||
background: var(--muted);
|
||||
}
|
||||
|
||||
/* ---- QP Section headers ---- */
|
||||
.qp-section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 8px 16px 4px;
|
||||
font-weight: 700;
|
||||
font-size: 13px;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.qp-section-actions {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* ---- QP icon buttons ---- */
|
||||
.qp-icon-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border-radius: 6px;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
border: 1px solid transparent;
|
||||
color: var(--muted);
|
||||
font-size: 14px;
|
||||
transition: background .15s ease, color .15s ease, border-color .15s ease;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.qp-icon-btn:hover {
|
||||
background: var(--white-06);
|
||||
border-color: var(--white-12);
|
||||
color: var(--ink);
|
||||
}
|
||||
|
||||
.qp-icon-btn.danger:hover {
|
||||
color: var(--danger, #ff3b3b);
|
||||
border-color: color-mix(in oklab, var(--danger, #ff3b3b) 30%, transparent);
|
||||
}
|
||||
|
||||
/* ---- QP toolbar ---- */
|
||||
.qp-toolbar {
|
||||
display: flex;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
padding: 0 16px 8px;
|
||||
}
|
||||
|
||||
.qp-toolbar-spacer {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
/* ---- QP loading spinner on buttons ---- */
|
||||
.qp-btn-loading {
|
||||
pointer-events: none;
|
||||
opacity: .6;
|
||||
}
|
||||
|
||||
.qp-btn-loading::after {
|
||||
content: "";
|
||||
display: inline-block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
border: 2px solid currentColor;
|
||||
border-top-color: transparent;
|
||||
border-radius: 50%;
|
||||
animation: qpSpin .6s linear infinite;
|
||||
margin-left: 6px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
@keyframes qpSpin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* ---- Actions Dropdown ---- */
|
||||
.actions {
|
||||
position: relative;
|
||||
@@ -2248,3 +2663,69 @@ input[type="color"].theme-input {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
}
|
||||
}
|
||||
|
||||
/* ── Console footer (chat input) ────────────────────────── */
|
||||
.console-footer {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
padding: 4px 8px;
|
||||
border-top: 1px solid var(--c-border);
|
||||
flex-shrink: 0;
|
||||
background: var(--c-panel, #1a1a1e);
|
||||
}
|
||||
.console-input {
|
||||
flex: 1;
|
||||
background: var(--bg, #09090b);
|
||||
border: 1px solid var(--c-border, #2a2a2e);
|
||||
border-radius: 4px;
|
||||
color: var(--ink, #fafafa);
|
||||
padding: 4px 8px;
|
||||
resize: none;
|
||||
font-family: var(--font-mono, 'Courier New', monospace);
|
||||
font-size: var(--console-font, 11px);
|
||||
line-height: 1.4;
|
||||
}
|
||||
.console-input:focus { border-color: var(--acid, #22c55e); outline: none; }
|
||||
.console-send-btn {
|
||||
padding: 4px 10px;
|
||||
background: var(--acid, #22c55e);
|
||||
color: var(--bg, #09090b);
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: var(--console-font, 11px);
|
||||
font-weight: 600;
|
||||
}
|
||||
.console-send-btn:hover { opacity: 0.8; }
|
||||
|
||||
/* ── Console bubble mode ────────────────────────────────── */
|
||||
.console.bubble-mode .console-body {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
.console-bubble-bjorn {
|
||||
margin: 3px 8px 3px 4px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 12px 12px 12px 4px;
|
||||
background: rgba(34, 197, 94, .12);
|
||||
color: var(--ink, #fafafa);
|
||||
max-width: 85%;
|
||||
align-self: flex-start;
|
||||
word-break: break-word;
|
||||
font-size: var(--console-font, 11px);
|
||||
line-height: 1.4;
|
||||
}
|
||||
.console-bubble-bjorn.llm { background: rgba(168, 85, 247, .12); }
|
||||
.console-bubble-user {
|
||||
margin: 3px 4px 3px 8px;
|
||||
padding: 5px 10px;
|
||||
border-radius: 12px 12px 4px 12px;
|
||||
background: rgba(59, 130, 246, .12);
|
||||
color: var(--ink, #fafafa);
|
||||
max-width: 85%;
|
||||
align-self: flex-end;
|
||||
margin-left: auto;
|
||||
word-break: break-word;
|
||||
font-size: var(--console-font, 11px);
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user