Testing
This commit is contained in:
+579
@@ -0,0 +1,579 @@
|
||||
/* ── Reset ─────────────────────────────────────────────────── */
|
||||
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
||||
|
||||
/* ── Dark theme (default) ──────────────────────────────────── */
|
||||
:root {
|
||||
--bg0: #111114;
|
||||
--bg1: #1a1a1f;
|
||||
--bg2: #222228;
|
||||
--bg3: #2a2a32;
|
||||
--bg4: #32323c;
|
||||
--fg1: #e2e2e8;
|
||||
--fg2: #8888a0;
|
||||
--fg3: #55556a;
|
||||
--accent: #7c3aed;
|
||||
--acc-h: #6d28d9;
|
||||
--acc-d: rgba(124,58,237,.15);
|
||||
--acc-dd: rgba(124,58,237,.08);
|
||||
--border: #2e2e38;
|
||||
--focus: #7c3aed;
|
||||
--ok: #22c55e;
|
||||
--err: #ef4444;
|
||||
--warn: #f59e0b;
|
||||
--scroll: #3a3a48;
|
||||
--code-bg: #0d0d12;
|
||||
--ububble: #1d4ed8;
|
||||
--ububble-text: #fff;
|
||||
--abubble: #1e1e26;
|
||||
--abubble-border: #2e2e38;
|
||||
--think-bg: rgba(245,158,11,.07);
|
||||
--think-border: rgba(245,158,11,.25);
|
||||
--think-text: #c8a840;
|
||||
--meta-text: #66667a;
|
||||
--chip-bg: #2a2a38;
|
||||
--chip-text: #a0a0c0;
|
||||
--danger: #ef4444;
|
||||
}
|
||||
|
||||
/* ── Light theme ───────────────────────────────────────────── */
|
||||
[data-theme="light"] {
|
||||
--bg0: #f0f2f5;
|
||||
--bg1: #ffffff;
|
||||
--bg2: #f8f8fb;
|
||||
--bg3: #eeeff4;
|
||||
--bg4: #e4e5ec;
|
||||
--fg1: #1a1a2e;
|
||||
--fg2: #55556e;
|
||||
--fg3: #9999b0;
|
||||
--border: #dddde8;
|
||||
--focus: #7c3aed;
|
||||
--ok: #16a34a;
|
||||
--err: #dc2626;
|
||||
--warn: #d97706;
|
||||
--scroll: #ccccdc;
|
||||
--code-bg: #f4f4f8;
|
||||
--ububble: #2563eb;
|
||||
--ububble-text: #fff;
|
||||
--abubble: #ffffff;
|
||||
--abubble-border: #dddde8;
|
||||
--think-bg: rgba(217,119,6,.07);
|
||||
--think-border: rgba(217,119,6,.3);
|
||||
--think-text: #92660a;
|
||||
--meta-text: #9999b0;
|
||||
--chip-bg: #e8e8f2;
|
||||
--chip-text: #5555a0;
|
||||
}
|
||||
|
||||
/* ── Base ──────────────────────────────────────────────────── */
|
||||
html, body {
|
||||
width: 100%; height: 100%; overflow: hidden;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
|
||||
font-size: 13px; line-height: 1.5;
|
||||
background: var(--bg0); color: var(--fg1);
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
#app {
|
||||
display: flex; flex-direction: column;
|
||||
height: 100vh; width: 100%; overflow: hidden;
|
||||
background: var(--bg0); color: var(--fg1);
|
||||
transition: background .2s, color .2s;
|
||||
}
|
||||
|
||||
/* ── Scrollbar ─────────────────────────────────────────────── */
|
||||
::-webkit-scrollbar { width: 4px; height: 4px; }
|
||||
::-webkit-scrollbar-track { background: transparent; }
|
||||
::-webkit-scrollbar-thumb { background: var(--scroll); border-radius: 2px; }
|
||||
|
||||
/* ── Header ────────────────────────────────────────────────── */
|
||||
header {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 8px 11px;
|
||||
background: var(--bg1); border-bottom: 1px solid var(--border);
|
||||
flex-shrink: 0; min-height: 40px; z-index: 2;
|
||||
}
|
||||
.h-left, .h-right { display: flex; align-items: center; gap: 5px; }
|
||||
.app-title { font-weight: 700; font-size: 13px; letter-spacing: .02em; }
|
||||
|
||||
.status-dot {
|
||||
width: 7px; height: 7px; border-radius: 50%;
|
||||
background: var(--warn); flex-shrink: 0;
|
||||
transition: background .3s;
|
||||
}
|
||||
.status-dot.connected { background: var(--ok); }
|
||||
.status-dot.error { background: var(--err); }
|
||||
|
||||
/* ── Buttons ───────────────────────────────────────────────── */
|
||||
.icon-btn {
|
||||
background: none; border: none; cursor: pointer;
|
||||
color: var(--fg2); font-size: 16px;
|
||||
padding: 4px 5px; border-radius: 5px; line-height: 1;
|
||||
transition: background .12s, color .12s;
|
||||
display: inline-flex; align-items: center; justify-content: center;
|
||||
}
|
||||
.icon-btn:hover { background: var(--bg3); color: var(--fg1); }
|
||||
.icon-btn.active { color: var(--accent); }
|
||||
.icon-btn.sm { font-size: 13px; padding: 3px 4px; }
|
||||
.icon-btn.danger:hover { color: var(--err); }
|
||||
|
||||
.primary-btn {
|
||||
width: 100%; padding: 8px 12px;
|
||||
background: var(--accent); color: #fff;
|
||||
border: none; border-radius: 6px; cursor: pointer;
|
||||
font-size: 13px; font-weight: 500; font-family: inherit;
|
||||
transition: background .12s;
|
||||
}
|
||||
.primary-btn:hover { background: var(--acc-h); }
|
||||
.primary-btn:active { transform: scale(.98); }
|
||||
.primary-btn.sm { padding: 5px 10px; font-size: 12px; width: auto; }
|
||||
|
||||
.pill-btn {
|
||||
background: var(--bg3); border: 1px solid var(--border);
|
||||
color: var(--fg2); padding: 3px 10px;
|
||||
border-radius: 20px; cursor: pointer; font-size: 11.5px; font-family: inherit;
|
||||
transition: background .12s, border-color .12s;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.pill-btn:hover { background: var(--bg4); border-color: var(--accent); color: var(--fg1); }
|
||||
|
||||
/* ── Drop panels (settings + sessions) ────────────────────── */
|
||||
.drop-panel {
|
||||
background: var(--bg1); border-bottom: 1px solid var(--border);
|
||||
padding: 11px; flex-shrink: 0;
|
||||
display: flex; flex-direction: column; gap: 9px;
|
||||
overflow-y: auto; max-height: 52vh;
|
||||
}
|
||||
.drop-panel.hidden { display: none; }
|
||||
|
||||
.field-group { display: flex; flex-direction: column; gap: 4px; }
|
||||
.field-lbl {
|
||||
font-size: 10px; font-weight: 600; text-transform: uppercase;
|
||||
letter-spacing: .06em; color: var(--fg2);
|
||||
display: flex; align-items: center; gap: 4px;
|
||||
}
|
||||
.hint { text-transform: none; font-weight: 400; letter-spacing: 0; color: var(--fg3); }
|
||||
|
||||
.field-group input {
|
||||
width: 100%; background: var(--bg0);
|
||||
border: 1px solid var(--border); color: var(--fg1);
|
||||
padding: 6px 9px; border-radius: 6px;
|
||||
font-size: 13px; font-family: inherit; outline: none;
|
||||
transition: border-color .12s;
|
||||
}
|
||||
.field-group input:focus { border-color: var(--focus); }
|
||||
|
||||
.input-row-inline { display: flex; gap: 4px; align-items: center; }
|
||||
.input-row-inline input { flex: 1; }
|
||||
|
||||
.status-line {
|
||||
font-size: 11.5px; text-align: center; min-height: 14px;
|
||||
color: var(--fg3); transition: color .2s;
|
||||
}
|
||||
.status-line.ok { color: var(--ok); }
|
||||
.status-line.err { color: var(--err); }
|
||||
|
||||
/* ── Sessions panel ────────────────────────────────────────── */
|
||||
.panel-hdr {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
margin-bottom: 2px;
|
||||
}
|
||||
.panel-title { font-size: 11px; font-weight: 600; text-transform: uppercase;
|
||||
letter-spacing: .06em; color: var(--fg2); }
|
||||
|
||||
.sessions-list { display: flex; flex-direction: column; gap: 2px; }
|
||||
|
||||
.session-item {
|
||||
display: flex; align-items: center; gap: 6px;
|
||||
padding: 7px 9px; border-radius: 7px; cursor: pointer;
|
||||
border: 1px solid transparent;
|
||||
transition: background .12s, border-color .12s;
|
||||
min-height: 36px;
|
||||
}
|
||||
.session-item:hover { background: var(--bg3); }
|
||||
.session-item.active { background: var(--acc-d); border-color: var(--accent); }
|
||||
|
||||
.session-item-name {
|
||||
flex: 1; font-size: 12.5px; white-space: nowrap;
|
||||
overflow: hidden; text-overflow: ellipsis; min-width: 0;
|
||||
}
|
||||
.session-item-meta { font-size: 10.5px; color: var(--fg3); white-space: nowrap; }
|
||||
.session-item-actions { display: flex; gap: 2px; opacity: 0; transition: opacity .15s; }
|
||||
.session-item:hover .session-item-actions { opacity: 1; }
|
||||
|
||||
/* ── Session bar ───────────────────────────────────────────── */
|
||||
.session-bar {
|
||||
display: flex; align-items: center; gap: 6px;
|
||||
padding: 5px 10px 5px 12px;
|
||||
background: var(--bg1); border-bottom: 1px solid var(--border);
|
||||
flex-shrink: 0; min-height: 34px;
|
||||
}
|
||||
.session-name {
|
||||
flex: 1; font-size: 12.5px; font-weight: 500;
|
||||
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
||||
cursor: text; color: var(--fg1);
|
||||
}
|
||||
.session-bar-actions { display: flex; gap: 2px; flex-shrink: 0; }
|
||||
|
||||
/* ── Chat area ─────────────────────────────────────────────── */
|
||||
.chat-area {
|
||||
flex: 1; overflow-y: auto; padding: 12px;
|
||||
display: flex; flex-direction: column; scroll-behavior: smooth;
|
||||
}
|
||||
|
||||
.messages { display: flex; flex-direction: column; gap: 14px; flex: 1; }
|
||||
|
||||
/* ── Empty state ───────────────────────────────────────────── */
|
||||
.empty-state {
|
||||
display: flex; flex-direction: column; align-items: center;
|
||||
justify-content: center; flex: 1; gap: 10px;
|
||||
text-align: center; padding: 32px 16px; user-select: none;
|
||||
}
|
||||
.empty-state .ei { font-size: 34px; line-height: 1; }
|
||||
.empty-state p { font-size: 13px; line-height: 1.7; max-width: 230px; color: var(--fg2); }
|
||||
|
||||
/* ── Messages ──────────────────────────────────────────────── */
|
||||
.message {
|
||||
display: flex; flex-direction: column; max-width: 100%;
|
||||
animation: msgIn .15s ease-out;
|
||||
}
|
||||
@keyframes msgIn { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:translateY(0); } }
|
||||
|
||||
.message.user { align-items: flex-end; }
|
||||
.message.assistant { align-items: flex-start; }
|
||||
|
||||
.msg-role {
|
||||
font-size: 9.5px; color: var(--fg3); margin-bottom: 3px; padding: 0 4px;
|
||||
font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
|
||||
}
|
||||
|
||||
.msg-body { display: flex; flex-direction: column; max-width: 92%; gap: 3px; }
|
||||
|
||||
.msg-bubble {
|
||||
padding: 8px 13px; border-radius: 14px;
|
||||
word-break: break-word; overflow-wrap: break-word;
|
||||
font-size: 13px; line-height: 1.65; white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.message.user .msg-bubble {
|
||||
background: var(--ububble); color: var(--ububble-text);
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
.message.assistant .msg-bubble {
|
||||
background: var(--abubble); color: var(--fg1);
|
||||
border: 1px solid var(--abubble-border);
|
||||
border-bottom-left-radius: 4px; white-space: normal;
|
||||
}
|
||||
|
||||
/* Streaming cursor */
|
||||
.msg-bubble.streaming::after {
|
||||
content: '\25AE'; display: inline-block; margin-left: 2px;
|
||||
color: var(--accent); animation: cblink .7s step-end infinite;
|
||||
}
|
||||
@keyframes cblink { 50% { opacity: 0; } }
|
||||
|
||||
/* Error bubble */
|
||||
.message.error .msg-bubble {
|
||||
background: rgba(239,68,68,.1);
|
||||
border: 1px solid rgba(239,68,68,.3); color: #fca5a5;
|
||||
}
|
||||
|
||||
/* Inline stream error note */
|
||||
.stream-err-note {
|
||||
margin-top: 6px; padding: 5px 9px;
|
||||
background: rgba(239,68,68,.08); border: 1px solid rgba(239,68,68,.25);
|
||||
border-radius: 5px; color: #fca5a5; font-size: 11.5px;
|
||||
}
|
||||
|
||||
/* ── Thinking block ────────────────────────────────────────── */
|
||||
.think-block {
|
||||
border: 1px solid var(--think-border);
|
||||
background: var(--think-bg); border-radius: 8px;
|
||||
overflow: hidden; font-size: 12px; max-width: 100%;
|
||||
}
|
||||
.think-block summary {
|
||||
padding: 5px 10px; cursor: pointer; user-select: none;
|
||||
color: var(--think-text); font-weight: 500; font-size: 11.5px;
|
||||
list-style: none; display: flex; align-items: center; gap: 5px;
|
||||
}
|
||||
.think-block summary::-webkit-details-marker { display: none; }
|
||||
.think-block summary::before { content: '▶'; font-size: 9px; transition: transform .2s; }
|
||||
.think-block[open] summary::before { transform: rotate(90deg); }
|
||||
.think-content {
|
||||
padding: 8px 10px 9px; color: var(--think-text);
|
||||
border-top: 1px solid var(--think-border);
|
||||
max-height: 200px; overflow-y: auto;
|
||||
white-space: pre-wrap; word-break: break-word;
|
||||
font-size: 12px; line-height: 1.55;
|
||||
}
|
||||
|
||||
/* ── Message metadata ──────────────────────────────────────── */
|
||||
.msg-meta { display: flex; flex-direction: column; gap: 3px; }
|
||||
|
||||
.source-chip {
|
||||
display: inline-flex; align-items: center; gap: 4px;
|
||||
padding: 2px 8px; border-radius: 4px;
|
||||
background: var(--acc-dd); color: var(--accent);
|
||||
font-size: 11px; border: 1px solid rgba(124,58,237,.2);
|
||||
max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
||||
}
|
||||
|
||||
.metrics-line {
|
||||
font-size: 10.5px; color: var(--meta-text);
|
||||
padding-left: 2px;
|
||||
}
|
||||
|
||||
/* ── Bubble action buttons ─────────────────────────────────── */
|
||||
.msg-actions {
|
||||
display: flex; gap: 3px; padding: 1px 2px;
|
||||
opacity: 0; transition: opacity .15s;
|
||||
}
|
||||
.message:hover .msg-actions { opacity: 1; }
|
||||
.act-btn {
|
||||
background: var(--bg3); border: 1px solid var(--border);
|
||||
color: var(--fg2); padding: 2px 7px;
|
||||
border-radius: 4px; cursor: pointer; font-size: 11.5px;
|
||||
font-family: inherit; transition: background .12s, color .12s, border-color .12s;
|
||||
display: inline-flex; align-items: center; gap: 3px;
|
||||
}
|
||||
.act-btn:hover { background: var(--bg4); border-color: var(--accent); color: var(--fg1); }
|
||||
|
||||
/* Edit mode */
|
||||
.edit-textarea {
|
||||
width: 100%; background: var(--bg0); border: 1px solid var(--focus);
|
||||
color: var(--fg1); padding: 8px 10px; border-radius: 8px;
|
||||
font-size: 13px; font-family: inherit; resize: vertical;
|
||||
outline: none; min-height: 60px; max-height: 180px;
|
||||
}
|
||||
.edit-actions { display: flex; gap: 6px; margin-top: 5px; }
|
||||
.secondary-btn {
|
||||
background: var(--bg3); border: 1px solid var(--border);
|
||||
color: var(--fg2); padding: 5px 12px;
|
||||
border-radius: 6px; cursor: pointer; font-size: 12px; font-family: inherit;
|
||||
transition: background .12s;
|
||||
}
|
||||
.secondary-btn:hover { background: var(--bg4); color: var(--fg1); }
|
||||
|
||||
/* Code inside bubbles */
|
||||
.msg-bubble pre {
|
||||
background: var(--code-bg); border: 1px solid var(--bg3);
|
||||
border-radius: 6px; padding: 9px 11px;
|
||||
overflow-x: auto; margin: 6px 0; white-space: pre;
|
||||
}
|
||||
.msg-bubble code {
|
||||
font-family: 'Fira Code','Cascadia Code','Menlo','Consolas', monospace; font-size: 12px;
|
||||
}
|
||||
.msg-bubble pre code { background: none; padding: 0; font-size: 11.5px; line-height: 1.5; }
|
||||
.msg-bubble :not(pre) > code {
|
||||
background: rgba(0,0,0,.25); padding: 1px 5px; border-radius: 3px; font-size: 12px;
|
||||
}
|
||||
[data-theme="light"] .msg-bubble :not(pre) > code { background: rgba(0,0,0,.07); }
|
||||
.msg-bubble strong { font-weight: 600; }
|
||||
.msg-bubble em { font-style: italic; }
|
||||
|
||||
/* ── Input area ────────────────────────────────────────────── */
|
||||
.input-area {
|
||||
flex-shrink: 0; background: var(--bg1);
|
||||
border-top: 1px solid var(--border);
|
||||
padding: 8px 11px 11px;
|
||||
display: flex; flex-direction: column; gap: 6px;
|
||||
}
|
||||
|
||||
/* Collapsibles (system prompt, params) */
|
||||
.collapsible {
|
||||
background: var(--bg2); border: 1px solid var(--border);
|
||||
border-radius: 8px; overflow: hidden;
|
||||
}
|
||||
.collapsible.hidden { display: none; }
|
||||
.coll-hdr {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 5px 10px; background: var(--bg3);
|
||||
font-size: 11px; font-weight: 600; text-transform: uppercase;
|
||||
letter-spacing: .05em; color: var(--fg2);
|
||||
}
|
||||
|
||||
.collapsible textarea, #input-system-prompt {
|
||||
width: 100%; background: var(--bg2); border: none;
|
||||
color: var(--fg1); padding: 8px 10px;
|
||||
font-size: 13px; font-family: inherit; resize: none;
|
||||
outline: none; max-height: 100px; overflow-y: auto;
|
||||
border-top: 1px solid var(--border);
|
||||
}
|
||||
|
||||
/* Params grid */
|
||||
.params-grid {
|
||||
padding: 8px 10px; display: grid;
|
||||
grid-template-columns: auto 1fr auto;
|
||||
gap: 5px 8px; align-items: center;
|
||||
}
|
||||
.param-lbl { font-size: 11.5px; color: var(--fg2); white-space: nowrap; }
|
||||
.param-input {
|
||||
width: 100%; background: var(--bg0); border: 1px solid var(--border);
|
||||
color: var(--fg1); padding: 3px 6px; border-radius: 5px;
|
||||
font-size: 12px; font-family: inherit; outline: none;
|
||||
}
|
||||
.param-input:focus { border-color: var(--focus); }
|
||||
.param-val { font-size: 11px; color: var(--fg3); text-align: right; min-width: 28px; }
|
||||
|
||||
/* File chips */
|
||||
.file-chips-area { display: flex; flex-wrap: wrap; gap: 5px; }
|
||||
.file-chips-area.hidden { display: none; }
|
||||
.file-chip {
|
||||
display: inline-flex; align-items: center; gap: 5px;
|
||||
background: var(--chip-bg); color: var(--chip-text);
|
||||
border: 1px solid var(--border); border-radius: 5px;
|
||||
padding: 3px 8px; font-size: 11.5px; max-width: 160px;
|
||||
}
|
||||
.file-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
|
||||
.file-chip-del {
|
||||
background: none; border: none; cursor: pointer;
|
||||
color: var(--fg3); font-size: 11px; padding: 0 1px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
.file-chip-del:hover { color: var(--err); }
|
||||
|
||||
/* Toolbar */
|
||||
.toolbar { display: flex; align-items: center; gap: 5px; }
|
||||
.tb-spacer { flex: 1; }
|
||||
.toolbar-btn {
|
||||
display: inline-flex; align-items: center; gap: 4px;
|
||||
background: var(--bg3); border: 1px solid var(--border);
|
||||
color: var(--fg2); padding: 4px 8px; border-radius: 5px;
|
||||
cursor: pointer; font-size: 11.5px; font-family: inherit;
|
||||
transition: border-color .12s, color .12s, background .12s;
|
||||
white-space: nowrap; max-width: 130px;
|
||||
}
|
||||
.toolbar-btn:hover { border-color: var(--accent); color: var(--fg1); }
|
||||
.toolbar-btn.active { background: var(--acc-d); border-color: var(--accent); color: var(--accent); }
|
||||
.tbi { font-size: 12px; flex-shrink: 0; line-height: 1; }
|
||||
|
||||
/* Page context label truncation */
|
||||
#page-ctx-lbl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 90px; }
|
||||
|
||||
/* Textarea */
|
||||
#input-message {
|
||||
width: 100%; background: var(--bg0); border: 1px solid var(--border);
|
||||
color: var(--fg1); padding: 8px 10px; border-radius: 8px;
|
||||
font-size: 13px; font-family: inherit; line-height: 1.5;
|
||||
resize: none; outline: none;
|
||||
min-height: 54px; max-height: 160px;
|
||||
transition: border-color .12s; overflow-y: auto; display: block;
|
||||
}
|
||||
#input-message:focus { border-color: var(--focus); }
|
||||
#input-message::placeholder { color: var(--fg3); opacity: .7; }
|
||||
#input-message:disabled { opacity: .5; cursor: not-allowed; }
|
||||
|
||||
/* Template dropdown */
|
||||
.tmpl-dropdown {
|
||||
background: var(--bg2); border: 1px solid var(--border);
|
||||
border-radius: 8px; overflow: hidden; z-index: 10;
|
||||
}
|
||||
.tmpl-dropdown.hidden { display: none; }
|
||||
.tmpl-dd-header {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 6px 10px; background: var(--bg3);
|
||||
font-size: 11px; font-weight: 600; text-transform: uppercase;
|
||||
letter-spacing: .05em; color: var(--fg2);
|
||||
}
|
||||
.tmpl-dd-list { max-height: 160px; overflow-y: auto; }
|
||||
.tmpl-dd-item {
|
||||
padding: 7px 11px; cursor: pointer;
|
||||
border-bottom: 1px solid var(--border);
|
||||
display: flex; flex-direction: column; gap: 2px;
|
||||
transition: background .1s;
|
||||
}
|
||||
.tmpl-dd-item:last-child { border-bottom: none; }
|
||||
.tmpl-dd-item:hover { background: var(--bg3); }
|
||||
.tmpl-dd-name { font-size: 12.5px; color: var(--fg1); font-weight: 500; }
|
||||
.tmpl-dd-preview { font-size: 11px; color: var(--fg3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
||||
|
||||
/* Send row */
|
||||
.send-row { display: flex; gap: 6px; align-items: center; }
|
||||
|
||||
#select-model {
|
||||
flex: 1; min-width: 0;
|
||||
background: var(--bg0); border: 1px solid var(--border);
|
||||
color: var(--fg1); padding: 6px 24px 6px 8px;
|
||||
border-radius: 7px; font-size: 12px; font-family: inherit;
|
||||
outline: none; cursor: pointer;
|
||||
-webkit-appearance: none; appearance: none;
|
||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23666'/%3E%3C/svg%3E");
|
||||
background-repeat: no-repeat; background-position: right 7px center;
|
||||
transition: border-color .12s;
|
||||
}
|
||||
#select-model:focus { border-color: var(--focus); }
|
||||
#select-model option { background: var(--bg2); color: var(--fg1); }
|
||||
|
||||
.send-btn {
|
||||
width: 34px; height: 34px; flex-shrink: 0;
|
||||
background: var(--accent); color: #fff; border: none;
|
||||
border-radius: 7px; cursor: pointer; font-size: 13px;
|
||||
display: inline-flex; align-items: center; justify-content: center;
|
||||
transition: background .12s, transform .1s;
|
||||
}
|
||||
.send-btn:hover { background: var(--acc-h); }
|
||||
.send-btn:active { transform: scale(.93); }
|
||||
.send-btn:disabled { background: var(--bg4); color: var(--fg3); cursor: not-allowed; transform: none; }
|
||||
|
||||
.stop-btn {
|
||||
width: 34px; height: 34px; flex-shrink: 0;
|
||||
background: var(--err); color: #fff; border: none;
|
||||
border-radius: 7px; cursor: pointer; font-size: 12px;
|
||||
display: inline-flex; align-items: center; justify-content: center;
|
||||
transition: background .12s;
|
||||
}
|
||||
.stop-btn:hover { background: #dc2626; }
|
||||
.stop-btn.hidden { display: none; }
|
||||
.send-btn.hidden { display: none; }
|
||||
|
||||
/* ── Template manager overlay ──────────────────────────────── */
|
||||
.overlay {
|
||||
position: absolute; inset: 0; z-index: 20;
|
||||
background: rgba(0,0,0,.55);
|
||||
display: flex; align-items: flex-start; justify-content: center;
|
||||
padding-top: 40px;
|
||||
}
|
||||
.overlay.hidden { display: none; }
|
||||
|
||||
.overlay-panel {
|
||||
background: var(--bg1); border: 1px solid var(--border);
|
||||
border-radius: 10px; width: calc(100% - 24px); max-width: 380px;
|
||||
display: flex; flex-direction: column; max-height: 80vh; overflow: hidden;
|
||||
}
|
||||
.overlay-hdr {
|
||||
display: flex; align-items: center; justify-content: space-between;
|
||||
padding: 10px 14px; border-bottom: 1px solid var(--border);
|
||||
font-weight: 600; font-size: 14px; flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tmpl-list {
|
||||
overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 0;
|
||||
}
|
||||
.tmpl-item {
|
||||
display: flex; align-items: flex-start; gap: 8px;
|
||||
padding: 9px 13px; border-bottom: 1px solid var(--border);
|
||||
transition: background .1s;
|
||||
}
|
||||
.tmpl-item:hover { background: var(--bg2); }
|
||||
.tmpl-item-body { flex: 1; min-width: 0; }
|
||||
.tmpl-item-name { font-size: 13px; font-weight: 500; color: var(--fg1); }
|
||||
.tmpl-item-text { font-size: 11.5px; color: var(--fg3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
|
||||
.tmpl-item-del {
|
||||
background: none; border: none; cursor: pointer;
|
||||
color: var(--fg3); font-size: 13px; padding: 2px 4px; flex-shrink: 0;
|
||||
}
|
||||
.tmpl-item-del:hover { color: var(--err); }
|
||||
|
||||
.tmpl-add-form {
|
||||
padding: 11px 13px; border-top: 1px solid var(--border);
|
||||
display: flex; flex-direction: column; gap: 7px; flex-shrink: 0;
|
||||
}
|
||||
.tmpl-add-form input, .tmpl-add-form textarea {
|
||||
background: var(--bg0); border: 1px solid var(--border);
|
||||
color: var(--fg1); padding: 7px 9px; border-radius: 6px;
|
||||
font-size: 13px; font-family: inherit; outline: none;
|
||||
}
|
||||
.tmpl-add-form input:focus, .tmpl-add-form textarea:focus { border-color: var(--focus); }
|
||||
.tmpl-add-form textarea { resize: vertical; min-height: 70px; }
|
||||
|
||||
/* ── Relative positioning for overlay ─────────────────────── */
|
||||
#app { position: relative; }
|
||||
Reference in New Issue
Block a user