- Add !important to all Flatpickr CSS overrides to beat CDN specificity - Change dateFormat from ISO 'Y-m-d\TH:i' to 'Y-m-d H:i' (double space) - Update tokGetFiltered to use .replace(/\s+/,'T') for Safari compat
1382 lines
55 KiB
CSS
1382 lines
55 KiB
CSS
/* GenericAgent 桌面版 — 界面骨架 mockup
|
||
仅布局与视觉占位。所有颜色均走 CSS 变量,主题可整体切换(无硬编码颜色)。 */
|
||
|
||
* { box-sizing: border-box; margin: 0; padding: 0; }
|
||
|
||
:root{
|
||
/* —— 基础面 —— */
|
||
--bg-base:#f4f5f7;
|
||
--bg:var(--bg-base);
|
||
--panel:#ffffff;
|
||
--card:#ffffff;
|
||
--field-bg:#fafbfc;
|
||
--line-base:#e9eaee;
|
||
--line:var(--line-base);
|
||
--line-soft-base:#f0f1f4;
|
||
--line-soft:var(--line-soft-base);
|
||
--line-strong:#d4d8e0; /* hover 描边 */
|
||
--hover-2:#eceef2; /* 次级 hover 底 */
|
||
--hover-dim:#0000000f;
|
||
|
||
/* —— 文字 —— */
|
||
--txt:#1f2430;
|
||
--txt-strong:#3b414f; /* 标题 */
|
||
--txt-2:#4a4f5c; /* 常规可点文字 */
|
||
--txt-3:#5b6170;
|
||
--muted:#8a90a0;
|
||
--muted2:#aab0be;
|
||
--placeholder:#c4cad6;
|
||
--icon:#6b7180;
|
||
--on-accent:#ffffff; /* 彩色底上的字/图标 */
|
||
|
||
/* —— 强调色(主题主色,切主题主要改这组)—— */
|
||
--blue:#1f6f53;
|
||
--blue-bg:#e7f2ed;
|
||
--blue-soft:#f1f8f4;
|
||
|
||
/* —— 品牌徽标渐变 —— */
|
||
--brand1:#ffb35c;
|
||
--brand2:#ff7a59;
|
||
|
||
/* —— 配置弹窗:主题色板(mac 8 色)—— */
|
||
--swatch-1:#1f6f53;
|
||
--swatch-2:#7c5cff;
|
||
--swatch-3:#007aff;
|
||
--swatch-4:#ff7a59;
|
||
--swatch-5:#ff2d55;
|
||
--swatch-6:#ff3b30;
|
||
--swatch-7:#ffcc00;
|
||
--swatch-8:#8e8e93;
|
||
|
||
/* —— 状态:成功 / 危险 / 关闭 —— */
|
||
--ok:#39a85a;
|
||
--ok-strong:#2f9e54;
|
||
--ok-bg:#e9f7ee;
|
||
--ok-ring:#39a85a33;
|
||
--danger:#d64545;
|
||
--danger-dot:#e23b3b;
|
||
--danger-text:#d3514f;
|
||
--danger-bg:#fdeceb;
|
||
--danger-ring:#e23b3b38;
|
||
--success:var(--ok-strong);
|
||
--success-bg:var(--ok-bg);
|
||
--success-ring:var(--ok-ring);
|
||
--off-bg:#eef0f3;
|
||
--switch-off:#cfd4de;
|
||
--dot-idle:#c2c7d0;
|
||
|
||
/* —— 外观切换页的样本色(不跟随当前主题,固定为 light/dark 实际配色) —— */
|
||
--sample-light-bg:#f4f5f7;
|
||
--sample-light-panel:#ffffff;
|
||
--sample-light-line:#e9eaee;
|
||
--sample-dark-bg:#0d1117;
|
||
--sample-dark-panel:#161b22;
|
||
--sample-dark-line:#30363d;
|
||
|
||
/* —— 阴影 / 遮罩 —— */
|
||
--overlay:#14192861;
|
||
--shadow:0 1px 2px #1419280a, 0 8px 24px #1419280d;
|
||
--shadow-pop:0 8px 24px #14192829;
|
||
--shadow-modal:0 18px 50px #14192847;
|
||
|
||
--radius:12px; --radius-sm:8px;
|
||
font-family:-apple-system,"Segoe UI","Microsoft YaHei",system-ui,sans-serif;
|
||
/* —— 折叠块 —— */
|
||
--fold-thinking-border:#d4c090;
|
||
--fold-thinking-bg:transparent;
|
||
--fold-tool-border:#90b8d4;
|
||
--fold-tool-bg:transparent;
|
||
--fold-result-border:#a0d4a0;
|
||
--fold-result-bg:transparent;
|
||
--fold-turn-border:var(--line);
|
||
--fold-turn-bg:transparent;
|
||
--fold-retry-border:var(--line-soft);
|
||
--fold-retry-bg:transparent;
|
||
--chat-max-w:clamp(600px, 75%, 1000px);
|
||
}
|
||
|
||
/* —— 主题色板(素色:仅 accent 浅底)—— */
|
||
html[data-theme]{
|
||
--blue-bg:color-mix(in srgb, var(--blue) 14%, var(--panel));
|
||
--blue-soft:color-mix(in srgb, var(--blue) 7%, var(--panel));
|
||
--brand1:color-mix(in srgb, var(--blue) 40%, #ffc978);
|
||
--brand2:var(--blue);
|
||
}
|
||
html[data-theme="7"]{ --on-accent:#1f2430; }
|
||
html[data-theme="8"]{ --on-accent:#ffffff; }
|
||
|
||
/* —— 外观:浅色(accent 轻 tint 页面/边框)—— */
|
||
html[data-appearance="light"]:not([data-plain="1"])[data-theme]{
|
||
--blue-bg:color-mix(in srgb, var(--blue) 20%, var(--panel));
|
||
--blue-soft:color-mix(in srgb, var(--blue) 11%, var(--panel));
|
||
--bg:color-mix(in srgb, var(--blue) 7%, var(--bg-base));
|
||
--line:color-mix(in srgb, var(--blue) 16%, var(--line-base));
|
||
--line-soft:color-mix(in srgb, var(--blue) 10%, var(--line-soft-base));
|
||
}
|
||
|
||
/* —— 外观:深色 —— */
|
||
html[data-appearance="dark"]{
|
||
--swatch-7:#ffd60a;
|
||
--swatch-8:#e6edf3;
|
||
--bg-base:#0d1117;
|
||
--bg:#0d1117;
|
||
--panel:#161b22;
|
||
--card:#161b22;
|
||
--field-bg:#0d1117;
|
||
--line-base:#30363d;
|
||
--line:#30363d;
|
||
--line-soft-base:#21262d;
|
||
--line-soft:#21262d;
|
||
--line-strong:#484f58;
|
||
--hover-2:#21262d;
|
||
--hover-dim:#ffffff0f;
|
||
--txt:#e6edf3;
|
||
--txt-strong:#ffffff;
|
||
--txt-2:#c9d1d9;
|
||
--txt-3:#afb8c1;
|
||
--muted:#7d8590;
|
||
--muted2:#656d76;
|
||
--placeholder:#484f58;
|
||
--icon:#7d8590;
|
||
--off-bg:#21262d;
|
||
--switch-off:#484f58;
|
||
--dot-idle:#484f58;
|
||
--ok:#3fb950;
|
||
--ok-strong:#46c35a;
|
||
--ok-bg:#12261e;
|
||
--ok-ring:#3fb95033;
|
||
--danger:#f85149;
|
||
--danger-dot:#f85149;
|
||
--danger-text:#ff7b72;
|
||
--danger-bg:#2d1515;
|
||
--danger-ring:#f8514938;
|
||
--overlay:#010409a6;
|
||
--shadow:0 1px 2px #01040966, 0 8px 24px #01040966;
|
||
--shadow-pop:0 8px 24px #01040999;
|
||
--shadow-modal:0 18px 50px #010409cc;
|
||
/* —— 折叠块(dark 覆盖) —— */
|
||
--fold-thinking-border:#6b5b30;
|
||
--fold-thinking-bg:transparent;
|
||
--fold-tool-border:#3a5066;
|
||
--fold-tool-bg:transparent;
|
||
--fold-result-border:#3f6647;
|
||
--fold-result-bg:transparent;
|
||
}
|
||
html[data-appearance="dark"][data-theme]{
|
||
--blue-bg:color-mix(in srgb, var(--blue) 22%, var(--panel));
|
||
--blue-soft:color-mix(in srgb, var(--blue) 12%, var(--panel));
|
||
}
|
||
html[data-appearance="dark"][data-theme="7"],
|
||
html[data-appearance="dark"][data-theme="8"]{ --on-accent:#0d1117; }
|
||
|
||
html,body{ height:100%; }
|
||
html{ --chat-font:14px; }
|
||
body{ background:var(--bg); color:var(--txt); font-size:13px; overflow:hidden; }
|
||
|
||
#app{
|
||
width:100vw; height:100vh; background:var(--bg);
|
||
overflow:hidden; display:flex; flex-direction:column;
|
||
}
|
||
|
||
/* ---- 弹窗(添加模型 / 配置)---- */
|
||
.chip.add-model{ padding:5px 8px; }
|
||
.modal{ position:fixed; inset:0; z-index:500; display:flex; align-items:center; justify-content:center; }
|
||
.modal[hidden]{ display:none; }
|
||
/* 添加模型是从「配置」里二级弹出,需盖在配置之上 */
|
||
#add-model-modal{ z-index:600; }
|
||
.modal-backdrop{ position:absolute; inset:0; background:var(--overlay); }
|
||
.modal-card{
|
||
position:relative; width:420px; max-width:92vw; max-height:86vh; overflow:hidden;
|
||
background:var(--panel); border:1px solid var(--line); border-radius:14px;
|
||
box-shadow:var(--shadow-modal); display:flex; flex-direction:column;
|
||
}
|
||
/* 弹出动画 */
|
||
@keyframes modalBgIn{ from{ opacity:0 } to{ opacity:1 } }
|
||
@keyframes modalCardIn{
|
||
from{ opacity:0; transform:translateY(10px) scale(.96); }
|
||
to{ opacity:1; transform:none; }
|
||
}
|
||
.modal:not([hidden]) .modal-backdrop{ animation:modalBgIn .15s ease-out; }
|
||
.modal:not([hidden]) .modal-card{ animation:modalCardIn .18s cubic-bezier(.2,.7,.3,1); }
|
||
|
||
.modal-head{
|
||
display:flex; align-items:center; justify-content:space-between;
|
||
padding:16px 18px; border-bottom:1px solid var(--line-soft);
|
||
}
|
||
.modal-title{ font-size:15px; font-weight:700; color:var(--txt-strong); }
|
||
.modal-x{
|
||
width:28px; height:28px; border:none; background:transparent; cursor:pointer;
|
||
color:var(--muted); border-radius:6px; display:flex; align-items:center; justify-content:center;
|
||
}
|
||
.modal-x svg{ width:16px; height:16px; }
|
||
.modal-x:hover{ background:var(--line-soft); }
|
||
.modal-body{ flex:1; min-height:340px; overflow:auto; }
|
||
|
||
/* 配置弹窗内的骨架控件(未实现逻辑)*/
|
||
.set-body{ min-height:0; padding:18px; display:flex; flex-direction:column; gap:22px; }
|
||
.set-block{ display:flex; flex-direction:column; gap:0; }
|
||
.preset-pop{ min-height:0; padding:18px; display:flex; flex-direction:column; gap:14px; }
|
||
.set-sec-t{ font-size:12px; font-weight:700; color:var(--txt-2); margin-bottom:10px; }
|
||
|
||
/* 外观:mac 式预览卡片 */
|
||
.appear-cards{ display:grid; grid-template-columns:1fr 1fr; gap:10px; }
|
||
.appear-card{
|
||
display:flex; flex-direction:column; align-items:center; gap:8px;
|
||
padding:10px 8px 9px; border:2px solid var(--line); border-radius:10px;
|
||
background:var(--field-bg); cursor:pointer; font-family:inherit; transition:.15s;
|
||
}
|
||
.appear-card:hover{ border-color:var(--line-strong); background:var(--line-soft); }
|
||
.appear-card.sel{
|
||
border-color:var(--blue); background:var(--blue-bg);
|
||
box-shadow:0 0 0 1px color-mix(in srgb, var(--blue) 25%, transparent);
|
||
}
|
||
.appear-preview{
|
||
width:100%; height:44px; border-radius:7px; border:1px solid var(--line);
|
||
position:relative; overflow:hidden;
|
||
}
|
||
.appear-preview-light{
|
||
background:linear-gradient(180deg, var(--sample-light-bg) 0%, var(--sample-light-bg) 42%, var(--sample-light-panel) 42%, var(--sample-light-panel) 100%);
|
||
}
|
||
.appear-preview-light::after{
|
||
content:''; position:absolute; left:10%; top:52%; width:55%; height:7px;
|
||
border-radius:4px; background:var(--sample-light-line);
|
||
}
|
||
.appear-preview-dark{
|
||
background:linear-gradient(180deg, var(--sample-dark-bg) 0%, var(--sample-dark-bg) 42%, var(--sample-dark-panel) 42%, var(--sample-dark-panel) 100%);
|
||
border-color:var(--sample-dark-line);
|
||
}
|
||
.appear-preview-dark::after{
|
||
content:''; position:absolute; left:10%; top:52%; width:55%; height:7px;
|
||
border-radius:4px; background:var(--sample-dark-line);
|
||
}
|
||
.appear-name{ font-size:12px; font-weight:600; color:var(--txt-2); }
|
||
.appear-card.sel .appear-name{ color:var(--blue); }
|
||
|
||
/* 素色:mac/iOS 设置行 + Toggle Switch */
|
||
.set-toggle-row{
|
||
display:flex; align-items:center; justify-content:space-between; gap:12px;
|
||
margin-top:10px; padding:10px 12px;
|
||
border:1px solid var(--line); border-radius:10px; background:var(--field-bg);
|
||
}
|
||
.set-toggle-row[hidden]{ display:none; }
|
||
.set-toggle-label{ font-size:13px; font-weight:600; color:var(--txt-2); }
|
||
.set-switch{
|
||
position:relative; flex:0 0 auto; width:44px; height:26px;
|
||
border:none; border-radius:999px; background:var(--switch-off);
|
||
cursor:pointer; transition:background .2s; padding:0;
|
||
}
|
||
.set-switch[aria-checked="true"]{ background:var(--blue); }
|
||
.set-switch-knob{
|
||
position:absolute; top:2px; left:2px; width:22px; height:22px;
|
||
border-radius:50%; background:var(--card);
|
||
box-shadow:0 1px 3px var(--hover-dim); transition:transform .2s;
|
||
}
|
||
.set-switch[aria-checked="true"] .set-switch-knob{ transform:translateX(18px); }
|
||
.set-switch:focus-visible{ outline:2px solid var(--blue); outline-offset:2px; }
|
||
|
||
.lang-list{ margin-bottom:0; }
|
||
|
||
.chat-font-panel{
|
||
display:grid; grid-template-columns:1fr auto; grid-template-rows:auto auto;
|
||
column-gap:14px; row-gap:6px; align-items:center;
|
||
padding:12px 14px; border:1px solid var(--line); border-radius:10px;
|
||
background:var(--field-bg);
|
||
}
|
||
.chat-font-stepper{ grid-column:1; grid-row:1; cursor:pointer; touch-action:none; border-radius:6px; }
|
||
.chat-font-value{
|
||
grid-column:2; grid-row:1 / 3; align-self:center;
|
||
font-size:13px; font-weight:600; color:var(--txt-strong);
|
||
font-variant-numeric:tabular-nums; text-align:right; line-height:1;
|
||
padding-left:14px; border-left:1px solid var(--line); min-width:42px;
|
||
}
|
||
.chat-font-scale{ grid-column:1; grid-row:2; }
|
||
.chat-font-stepper:focus{ outline:none; }
|
||
.chat-font-stepper:focus-visible{
|
||
outline:2px solid var(--blue); outline-offset:2px;
|
||
}
|
||
.chat-font-segments{
|
||
display:grid; grid-template-columns:repeat(11, 1fr); gap:3px;
|
||
}
|
||
.chat-font-seg{
|
||
height:7px; border:none; padding:0; margin:0; border-radius:2px;
|
||
background:var(--line); cursor:pointer;
|
||
transition:background .12s;
|
||
}
|
||
.chat-font-seg.on{ background:color-mix(in srgb, var(--blue) 55%, var(--line)); }
|
||
.chat-font-seg.cur{ background:var(--blue); }
|
||
.chat-font-seg:hover{ background:color-mix(in srgb, var(--blue) 35%, var(--line)); }
|
||
.chat-font-seg.on:hover{ background:color-mix(in srgb, var(--blue) 55%, var(--line)); }
|
||
.chat-font-seg.cur:hover{ background:var(--blue); }
|
||
.chat-font-scale{
|
||
display:grid; grid-template-columns:repeat(11, 1fr); gap:3px;
|
||
font-size:11px; line-height:1; color:var(--muted); font-variant-numeric:tabular-nums;
|
||
}
|
||
.chat-font-scale-min{ grid-column:1; justify-self:start; }
|
||
.chat-font-scale-max{ grid-column:11; justify-self:end; }
|
||
|
||
/* 颜色:mac 式 4×2 色盘 */
|
||
.color-grid{
|
||
display:grid; grid-template-columns:repeat(4, 1fr); gap:12px 10px;
|
||
justify-items:center; max-width:220px;
|
||
}
|
||
.swatch{
|
||
position:relative; width:32px; height:32px; border-radius:50%; cursor:pointer;
|
||
background:var(--swatch-color, var(--swatch-1));
|
||
border:2px solid color-mix(in srgb, var(--panel) 70%, transparent);
|
||
box-shadow:0 1px 2px var(--hover-dim);
|
||
transition:transform .12s, box-shadow .12s;
|
||
}
|
||
.swatch:hover{ transform:scale(1.08); }
|
||
.swatch:focus-visible{ outline:2px solid var(--blue); outline-offset:2px; }
|
||
.swatch.sel{
|
||
box-shadow:0 0 0 2px var(--panel), 0 0 0 4px var(--blue);
|
||
transform:scale(1.04);
|
||
}
|
||
.swatch.sel::after{
|
||
content:''; position:absolute; inset:0; border-radius:50%;
|
||
background:center/14px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
|
||
}
|
||
html[data-theme="7"] .swatch[data-theme="7"].sel::after,
|
||
html[data-appearance="dark"] .swatch[data-theme="8"].sel::after{
|
||
background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f2430' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
|
||
}
|
||
.swatch[data-theme="1"]{ --swatch-color:var(--swatch-1); }
|
||
.swatch[data-theme="2"]{ --swatch-color:var(--swatch-2); }
|
||
.swatch[data-theme="3"]{ --swatch-color:var(--swatch-3); }
|
||
.swatch[data-theme="4"]{ --swatch-color:var(--swatch-4); }
|
||
.swatch[data-theme="5"]{ --swatch-color:var(--swatch-5); }
|
||
.swatch[data-theme="6"]{ --swatch-color:var(--swatch-6); }
|
||
.swatch[data-theme="7"]{ --swatch-color:var(--swatch-7); }
|
||
.swatch[data-theme="8"]{ --swatch-color:var(--swatch-8); }
|
||
.model-list{ display:flex; flex-direction:column; gap:4px; margin-bottom:10px; max-height:160px; overflow:auto; }
|
||
.model-row{
|
||
display:flex; align-items:center; gap:10px; padding:8px 10px;
|
||
border:1px solid var(--line); border-radius:8px; background:var(--field-bg);
|
||
cursor:pointer; font-size:13px; color:var(--txt-2); transition:.12s;
|
||
}
|
||
.model-row:hover{ background:var(--line-soft); border-color:var(--line-strong); }
|
||
.model-row.sel{ background:var(--blue-bg); border-color:var(--blue); color:var(--blue); font-weight:600; }
|
||
.model-row input{ accent-color:var(--blue); flex:0 0 auto; pointer-events:none; }
|
||
.flag{ width:20px; height:14px; flex:0 0 auto; border-radius:2px; box-shadow:0 0 0 1px var(--line); display:inline-block; }
|
||
.model-row-name{ flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
|
||
.model-row-actions{
|
||
display:flex; gap:2px; flex:0 0 auto; opacity:0; transition:opacity .12s;
|
||
}
|
||
.model-row:hover .model-row-actions,
|
||
.model-row.sel .model-row-actions{ opacity:1; }
|
||
.model-act{
|
||
width:28px; height:28px; border:none; background:transparent; cursor:pointer;
|
||
color:var(--muted); border-radius:6px; display:flex; align-items:center; justify-content:center;
|
||
padding:0; flex:0 0 auto;
|
||
}
|
||
.model-act:hover{ background:var(--hover-dim); color:var(--txt-2); }
|
||
.model-act-del:hover{ color:var(--danger-text); }
|
||
.model-act svg{ width:14px; height:14px; pointer-events:none; }
|
||
.set-empty{ font-size:12px; color:var(--muted); padding:6px 0; }
|
||
.set-btn{
|
||
width:100%; display:flex; align-items:center; gap:8px;
|
||
border:1px solid var(--line); background:var(--card); color:var(--txt-2);
|
||
border-radius:8px; padding:10px 12px; font-size:13px; font-weight:600;
|
||
font-family:inherit; cursor:pointer; transition:.12s;
|
||
}
|
||
.set-btn svg{ width:15px; height:15px; flex:0 0 auto; color:var(--blue); }
|
||
.set-btn:hover{ background:var(--line-soft); border-color:var(--line-strong); }
|
||
.set-btn.primary{ background:var(--blue); color:var(--on-accent); border-color:var(--blue); }
|
||
.set-btn.primary:hover{ filter:brightness(1.05); }
|
||
.set-btn.ghost{ background:transparent; }
|
||
.model-form-body{ min-height:0; }
|
||
.model-form{ padding:18px; display:flex; flex-direction:column; gap:12px; }
|
||
.model-form label{ display:flex; flex-direction:column; gap:5px; font-size:12px; font-weight:600; color:var(--txt-2); }
|
||
.field-label{ display:inline-flex; align-items:center; gap:2px; }
|
||
.field-req{ color:var(--danger-text); font-weight:700; line-height:1; }
|
||
.model-form input{
|
||
border:1px solid var(--line); border-radius:8px; padding:8px 10px;
|
||
font-size:13px; font-family:inherit; background:var(--field-bg); color:var(--txt);
|
||
}
|
||
.model-form input:focus{ outline:none; border-color:var(--blue); }
|
||
.model-form input::placeholder{ color:var(--placeholder); opacity:1; }
|
||
|
||
/* 协议选择:分段控件(替代 native dropdown,样式可控)*/
|
||
.model-form-field{ display:flex; flex-direction:column; gap:5px; font-size:12px; font-weight:600; color:var(--txt-2); }
|
||
.seg-group{
|
||
display:flex; gap:4px; padding:3px;
|
||
border:1px solid var(--line); border-radius:8px; background:var(--field-bg);
|
||
}
|
||
.seg-opt{
|
||
flex:1; display:flex; align-items:center; justify-content:center;
|
||
padding:7px 10px; border-radius:6px; cursor:pointer;
|
||
font-size:12px; font-weight:600; color:var(--txt-2);
|
||
transition:background .12s, color .12s; user-select:none;
|
||
}
|
||
.seg-opt input{ position:absolute; opacity:0; pointer-events:none; }
|
||
.seg-opt:hover{ background:var(--line-soft); color:var(--txt); }
|
||
.seg-opt:has(input:checked){ background:var(--blue); color:var(--on-accent); }
|
||
.seg-opt:has(input:checked):hover{ background:var(--blue); color:var(--on-accent); }
|
||
.model-form .field-hint{ font-size:11px; font-weight:400; color:var(--muted); line-height:1.45; margin-top:2px; }
|
||
#add-model-form .model-form-row{
|
||
display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; width:100%;
|
||
}
|
||
#add-model-form .model-form-mini{
|
||
gap:4px; font-size:11px; font-weight:600;
|
||
}
|
||
#add-model-form .model-form-mini input[type="number"]{
|
||
padding:5px 6px; font-size:12px; line-height:1.2; height:30px;
|
||
border:1px solid var(--line); border-radius:6px;
|
||
background:var(--field-bg); color:var(--txt); font-family:inherit;
|
||
}
|
||
#add-model-form .model-form-mini input[type="number"]:focus{
|
||
outline:none; border-color:var(--blue);
|
||
}
|
||
.model-form-actions{ display:flex; gap:8px; margin-top:4px; }
|
||
.model-form-actions .set-btn{ flex:1; justify-content:center; }
|
||
.model-form-err{ font-size:12px; color:var(--danger-text); }
|
||
|
||
.body{
|
||
flex:1; display:flex; min-height:0;
|
||
background:var(--bg); padding:14px; gap:6px;
|
||
position:relative;
|
||
}
|
||
|
||
/* ============ ① 侧边栏(立体卡片 · 美术重点)============ */
|
||
.sidebar{
|
||
width:232px; flex:0 0 232px; background:var(--panel);
|
||
border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow);
|
||
overflow:hidden; display:flex; flex-direction:column;
|
||
padding:14px 12px;
|
||
transition:width .2s, padding .2s, opacity .15s, flex .2s;
|
||
}
|
||
.brand{ display:flex; align-items:center; gap:10px; padding:6px 6px 16px; }
|
||
.brand-logo{
|
||
width:34px; height:34px; border-radius:9px;
|
||
background:linear-gradient(135deg,var(--brand1),var(--brand2)); color:var(--on-accent);
|
||
display:flex; align-items:center; justify-content:center; font-weight:700; font-size:13px;
|
||
}
|
||
.brand-name{ font-weight:700; font-size:15px; }
|
||
.brand-sub{ font-size:11px; color:var(--muted); margin-top:1px; }
|
||
|
||
.nav{ display:flex; flex-direction:column; gap:2px; flex:1; overflow:auto; }
|
||
.nav-item{
|
||
display:flex; align-items:center; gap:10px; padding:9px 10px;
|
||
border-radius:var(--radius-sm); color:var(--txt-2); cursor:pointer;
|
||
font-size:13px; user-select:none;
|
||
}
|
||
.ic{ width:18px; height:18px; flex:0 0 auto; }
|
||
.nav-item .ic{ opacity:.85; }
|
||
.fr-l{ display:flex; align-items:center; gap:10px; }
|
||
.nav-item:hover{ background:var(--line-soft); }
|
||
.nav-item.active{ background:var(--blue-bg); color:var(--blue); font-weight:600; }
|
||
.beta{
|
||
margin-left:auto; font-size:9px; font-weight:700; color:var(--blue);
|
||
background:var(--blue-soft); padding:1px 6px; border-radius:10px; letter-spacing:.3px;
|
||
}
|
||
.nav-item.active .beta{ background:var(--card); }
|
||
|
||
.sidebar-foot{ border-top:1px solid var(--line-soft); padding-top:10px; margin-top:8px; }
|
||
.foot-row{
|
||
display:flex; justify-content:space-between; align-items:center;
|
||
padding:8px 10px; border-radius:var(--radius-sm); color:var(--txt-2); cursor:pointer;
|
||
}
|
||
.foot-row:hover{ background:var(--line-soft); }
|
||
.chev{ width:14px; height:14px; color:var(--muted2); flex:0 0 auto; }
|
||
.foot-ver{ font-size:10px; color:var(--muted2); padding:10px 10px 2px; }
|
||
|
||
/* ============ 中间主区 ============ */
|
||
.main{
|
||
flex:1; display:flex; flex-direction:column; min-width:0;
|
||
background:var(--panel); border:1px solid var(--line);
|
||
border-radius:14px; box-shadow:var(--shadow); overflow:hidden;
|
||
}
|
||
|
||
.topbar{
|
||
height:46px; flex:0 0 46px; display:flex; align-items:center;
|
||
justify-content:space-between; padding:0 16px; border-bottom:1px solid var(--line);
|
||
background:var(--panel);
|
||
}
|
||
.tb-left{ display:flex; align-items:center; gap:14px; font-size:12px; }
|
||
.pill{
|
||
border:1px solid var(--line); background:var(--card); border-radius:20px;
|
||
padding:5px 12px; font-size:12px; color:var(--txt-2); cursor:pointer;
|
||
}
|
||
.pill:hover{ border-color:var(--line-strong); }
|
||
/* 纯状态展示组件(不可点):就绪=绿,运行中=红 */
|
||
.run-state{
|
||
display:flex; align-items:center; gap:9px; height:30px; color:var(--ok);
|
||
font-weight:600; font-size:12px; border:none; background:transparent;
|
||
padding:0; font-family:inherit; cursor:default; line-height:1;
|
||
}
|
||
.run-state .dot{
|
||
width:9px; height:9px; border-radius:50%; background:var(--ok); flex:0 0 auto;
|
||
}
|
||
.run-state.busy{ color:var(--danger); }
|
||
.run-state.busy .dot{ background:var(--danger-dot); }
|
||
.link{ color:var(--blue); cursor:pointer; }
|
||
.muted{ color:var(--muted); }
|
||
.ic-btn{
|
||
width:30px; height:30px; border-radius:8px; border:1px solid transparent;
|
||
background:transparent; cursor:pointer; color:var(--icon);
|
||
display:flex; align-items:center; justify-content:center;
|
||
}
|
||
.ic-btn svg{ width:16px; height:16px; }
|
||
.ic-btn:hover{ background:var(--line-soft); }
|
||
|
||
.chat-tools{
|
||
display:flex; align-items:center; gap:8px; padding:10px 16px;
|
||
border-bottom:1px solid var(--line-soft);
|
||
}
|
||
.chat-tools .spacer{ flex:1; }
|
||
|
||
/* ---- 多页面容器:一项导航一页 ---- */
|
||
#pages{ flex:1; min-height:0; display:flex; }
|
||
.page{ display:none; flex:1; min-height:0; flex-direction:column; }
|
||
.page.active{ display:flex; }
|
||
.page-pad{ flex:1; overflow:auto; padding:26px 30px; }
|
||
.page-title{ font-size:18px; font-weight:700; color:var(--txt-strong); }
|
||
.page-sub{ font-size:12px; color:var(--muted); margin-top:5px; margin-bottom:16px; }
|
||
|
||
/* 聊天页 */
|
||
.msg-area{
|
||
position:relative;
|
||
flex:1; overflow:auto; display:flex; flex-direction:column;
|
||
align-items:center; justify-content:center; gap:14px; padding:24px;
|
||
}
|
||
.msg-area.has-msgs .msg-loading{ margin-top:auto; }
|
||
.msg-loading{
|
||
position:sticky; bottom:16px; align-self:center; z-index:20;
|
||
display:flex; align-items:center; gap:10px;
|
||
margin-top:12px; padding:10px 16px;
|
||
border-radius:999px; background:var(--card);
|
||
border:1px solid color-mix(in srgb, var(--blue) 35%, var(--line));
|
||
box-shadow:var(--shadow-pop);
|
||
font-size:13px; font-weight:600; color:var(--txt);
|
||
pointer-events:none;
|
||
}
|
||
.msg-loading[hidden]{ display:none !important; }
|
||
.msg-area.is-loading .msg-loading{ animation:msg-loading-in .2s ease-out; }
|
||
@keyframes msg-loading-in{
|
||
from{ opacity:0; transform:translateY(8px); }
|
||
to{ opacity:1; transform:translateY(0); }
|
||
}
|
||
.ga-spin{
|
||
width:20px; height:20px; flex:0 0 auto;
|
||
border:2.5px solid var(--line); border-top-color:var(--blue);
|
||
border-radius:50%; animation:ga-spin .65s linear infinite;
|
||
}
|
||
@keyframes ga-spin{ to{ transform:rotate(360deg); } }
|
||
.msg-area.has-msgs{ align-items:stretch; justify-content:flex-start; }
|
||
.conv-empty{ color:var(--muted2); font-size:12px; }
|
||
|
||
/* 消息流 */
|
||
.msgs{ width:100%; max-width:var(--chat-max-w); margin:0 auto; display:flex; flex-direction:column; gap:14px; }
|
||
.msg{ display:flex; flex-wrap:wrap; }
|
||
.msg.user{ justify-content:flex-end; }
|
||
.msg.assistant,.msg.error{ justify-content:flex-start; }
|
||
.msg.system{ justify-content:center; }
|
||
.bubble{
|
||
max-width:85%; padding:8px 0; border-radius:0; font-size:var(--chat-font);
|
||
line-height:1.6; white-space:pre-wrap; word-break:break-word;
|
||
background:none; color:var(--txt-strong); font-weight:600;
|
||
}
|
||
.bubble.md{ white-space:normal; background:none; color:var(--txt); max-width:100%; width:100%; font-weight:400; }
|
||
.bubble.err{ background:var(--danger-bg); color:var(--danger-text); white-space:normal; padding:8px 14px; border-radius:8px; }
|
||
.bubble.sys{ background:transparent; color:var(--muted); font-size:12px; padding:4px 8px; }
|
||
.bubble.md p{ margin:0 0 8px; } .bubble.md p:last-child{ margin:0; }
|
||
.bubble.md pre{ background:var(--field-bg); border:1px solid var(--line); border-radius:8px; padding:10px 12px; overflow:auto; font-size:.86em; }
|
||
.bubble.md :not(pre) > code{ background:var(--field-bg); border-radius:4px; padding:1px 5px; font-size:.86em; }
|
||
.bubble.md a{ color:var(--blue); }
|
||
.bubble.md ul,.bubble.md ol{ margin:0 0 8px; padding-left:20px; }
|
||
.bubble.md blockquote{
|
||
margin:0 0 8px; padding:0 0 0 12px;
|
||
border-left:3px solid var(--line-strong); color:var(--txt-2);
|
||
}
|
||
.bubble.md h1,.bubble.md h2,.bubble.md h3,.bubble.md h4,.bubble.md h5,.bubble.md h6{
|
||
color:var(--txt-strong); margin:0 0 8px; line-height:1.35;
|
||
}
|
||
.bubble.md h1{ font-size:1.25em; } .bubble.md h2{ font-size:1.15em; } .bubble.md h3{ font-size:1.05em; }
|
||
.bubble.md strong,.bubble.md b{ color:var(--txt-strong); font-weight:600; }
|
||
.bubble.md hr{ border:none; border-top:1px solid var(--line-strong); margin:10px 0; }
|
||
.bubble.md table{ width:100%; border-collapse:collapse; margin:0 0 8px; font-size:.92em; }
|
||
.bubble.md th,.bubble.md td{ border:1px solid var(--line); padding:6px 10px; text-align:left; }
|
||
.bubble.md th{ background:var(--line-soft); color:var(--txt-strong); }
|
||
.fold{ margin:4px 0; border:none; border-left:2px solid var(--line); border-radius:0; background:transparent; padding-left:12px; }
|
||
.bubble .fold summary{ cursor:pointer; padding:4px 0; font-size:.82em; color:var(--muted); user-select:none; }
|
||
.bubble .fold summary:hover{ color:var(--txt-2); }
|
||
.bubble .fold pre{ margin:0; padding:6px 0; border:none; background:transparent; font-size:.8em; overflow:auto; }
|
||
.cursor{ display:inline-block; width:7px; height:14px; background:var(--blue); vertical-align:-2px; margin-left:2px; animation:blink 1s steps(2) infinite; }
|
||
@keyframes blink{ 50%{ opacity:0; } }
|
||
.run-state.busy .dot{ animation:blink 1s steps(2) infinite; }
|
||
|
||
/* 预设功能卡片(现在嵌在聊天空状态)*/
|
||
.chat-start{ width:100%; max-width:var(--chat-max-w); }
|
||
html[data-boot-has-sessions] .chat-start{ display:none !important; }
|
||
.feature-head{ text-align:center; margin-bottom:22px; }
|
||
.feature-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; }
|
||
.fcard{
|
||
border:1px solid var(--line); border-radius:var(--radius); background:var(--card);
|
||
padding:16px 14px; cursor:pointer; transition:.15s;
|
||
}
|
||
.fcard:hover{ border-color:var(--blue); box-shadow:var(--shadow); transform:translateY(-1px); }
|
||
.fcard.add{ border-style:dashed; background:var(--blue-soft); }
|
||
.fc-ic{ width:26px; height:26px; color:var(--txt-strong); }
|
||
.fc-t{ font-weight:600; font-size:13px; margin-top:10px; }
|
||
.fc-d{ font-size:11px; color:var(--muted); margin-top:3px; }
|
||
|
||
/* 通用列表(消息通道 / 状态面板 / token 明细)*/
|
||
.list{ display:flex; flex-direction:column; gap:6px; margin-top:14px; }
|
||
.list-row{
|
||
display:flex; align-items:center; gap:12px; padding:11px 14px;
|
||
border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--card); font-size:13px;
|
||
}
|
||
.list-row.head{ background:var(--line-soft); color:var(--muted); font-size:11px; border:none; }
|
||
.lr-ic{ width:18px; height:18px; color:var(--muted); flex:0 0 auto; }
|
||
.grow{ flex:1; }
|
||
.kv{ color:var(--muted); font-size:12px; min-width:54px; text-align:right; }
|
||
.lr-st{ font-size:11px; padding:2px 8px; border-radius:10px; font-weight:600; }
|
||
.lr-st.on{ color:var(--ok-strong); background:var(--ok-bg); }
|
||
.lr-st.off{ color:var(--muted); background:var(--off-bg); }
|
||
.lr-st.err{ color:var(--danger-text); background:var(--danger-bg); }
|
||
.sw-mini{ width:32px; height:18px; border:none; border-radius:12px; background:var(--switch-off); position:relative; cursor:pointer; }
|
||
.sw-mini i{ position:absolute; top:2px; left:2px; width:14px; height:14px; background:var(--on-accent); border-radius:50%; transition:.15s; }
|
||
.sw-mini.on{ background:var(--blue); }
|
||
.sw-mini.on i{ left:16px; }
|
||
.sw-mini:disabled{ opacity:.45; cursor:not-allowed; }
|
||
.link.sm{ font-size:12px; }
|
||
.link-btn{
|
||
border:none; background:none; padding:0; font:inherit;
|
||
color:var(--blue); cursor:pointer;
|
||
}
|
||
.link-btn:disabled{ opacity:.45; cursor:not-allowed; }
|
||
.list-row .link-btn, .list-row .sw-mini{ flex-shrink:0; }
|
||
.list-empty{
|
||
margin-top:14px; padding:24px; text-align:center;
|
||
font-size:13px; color:var(--muted);
|
||
}
|
||
.toast-root{
|
||
position:fixed; left:50%; top:72px; transform:translateX(-50%);
|
||
z-index:99999; display:flex; flex-direction:column; align-items:center; gap:8px;
|
||
pointer-events:none; max-width:min(420px,92vw); width:max-content;
|
||
}
|
||
.toast{
|
||
padding:12px 20px; border-radius:var(--radius-sm);
|
||
font-size:13px; line-height:1.45;
|
||
box-shadow:var(--shadow-pop);
|
||
opacity:0; transform:translateY(-8px); transition:opacity .28s ease, transform .28s ease;
|
||
pointer-events:auto; text-align:center; min-width:200px;
|
||
}
|
||
.toast.show{ opacity:1; transform:translateY(0); }
|
||
.toast-ok{
|
||
color:var(--success); background:var(--success-bg); border:1px solid var(--success-ring);
|
||
}
|
||
.toast-err{
|
||
color:var(--danger-text); background:var(--danger-bg); border:1px solid var(--danger-ring);
|
||
}
|
||
.toast-info{
|
||
color:var(--muted); background:var(--card); border:1px solid var(--line);
|
||
box-shadow:var(--shadow); padding:6px 12px; min-width:0; font-size:12px;
|
||
}
|
||
.toast-title{ font-weight:600; display:block; margin-bottom:2px; }
|
||
.toast-detail{ font-size:12px; opacity:.88; display:block; word-break:break-word; }
|
||
.toast-info .toast-title{ font-weight:500; margin-bottom:0; }
|
||
.composer.is-locked{
|
||
opacity:.55; pointer-events:none; filter:saturate(.75);
|
||
}
|
||
.composer.is-locked .input{
|
||
background:var(--field-bg); cursor:not-allowed;
|
||
}
|
||
.chan-log-pre{
|
||
max-height:360px; overflow:auto; margin:0;
|
||
font-family:inherit; font-size:13px; line-height:1.5;
|
||
color:var(--txt-2); background:var(--field-bg);
|
||
border:1px solid var(--line); border-radius:var(--radius-sm);
|
||
padding:14px 16px; white-space:pre-wrap; word-break:break-word;
|
||
}
|
||
.modal-card-wide{ width:min(720px,92vw); }
|
||
.modal-card-inset{ width:min(680px,calc(92vw - 48px)); }
|
||
.modal-body-inset{ padding:0 18px 18px; min-height:0; }
|
||
.chan-config-body{
|
||
display:flex; flex-direction:column; gap:8px;
|
||
}
|
||
.mykey-editor{
|
||
flex:1; min-height:420px; width:100%;
|
||
padding:0; margin:0;
|
||
font-family:inherit; font-size:13px; line-height:1.5;
|
||
color:var(--txt); background:var(--card);
|
||
border:none; border-radius:0; resize:vertical; outline:none;
|
||
}
|
||
.mykey-editor:focus{ outline:none; }
|
||
.chan-config-foot{
|
||
display:flex; justify-content:flex-end;
|
||
}
|
||
.chan-config-save{
|
||
border:1px solid var(--line); background:var(--card); color:var(--txt-2);
|
||
border-radius:6px; padding:5px 12px; font-size:12px; font-weight:600;
|
||
font-family:inherit; cursor:pointer;
|
||
}
|
||
.chan-config-save:hover{ background:var(--hover-2); }
|
||
.chan-config-save:disabled{ opacity:.45; cursor:not-allowed; }
|
||
.chan-meta{ display:flex; flex-direction:column; gap:2px; min-width:0; }
|
||
.chan-meta .chan-name{ font-size:14px; }
|
||
.chan-meta .chan-path{ font-size:11px; color:var(--muted); }
|
||
|
||
/* 协作动态卡片 */
|
||
.card-row{ display:grid; grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:12px; margin:14px 0; }
|
||
.card-mini{ border:1px solid var(--line); border-radius:var(--radius-sm); background:var(--card); padding:14px; }
|
||
.card-mini b{ font-size:13px; }
|
||
.cm-st{ font-size:11px; font-weight:600; margin-top:8px; }
|
||
.cm-st.on{ color:var(--ok-strong); } .cm-st.idle{ color:var(--muted); }
|
||
.cm-d{ font-size:11px; color:var(--muted); margin-top:4px; }
|
||
|
||
/* token 汇总卡 */
|
||
.tok-filter{ display:flex; align-items:center; gap:8px; margin:12px 0; flex-wrap:wrap; }
|
||
.tok-filter label{ font-size:12px; color:var(--muted); }
|
||
.tok-date{
|
||
border:1px solid var(--line); border-radius:6px; padding:5px 8px;
|
||
font-size:12px; background:var(--field-bg); color:var(--txt); cursor:pointer;
|
||
width:160px;
|
||
}
|
||
.tok-date:focus{ border-color:var(--blue); outline:none; }
|
||
/* Flatpickr 主题覆盖 — 全部使用项目 CSS 变量 */
|
||
.flatpickr-calendar{
|
||
background:var(--card) !important; border:1px solid var(--line) !important; border-radius:var(--radius) !important;
|
||
box-shadow:var(--shadow-pop) !important; font-size:13px;
|
||
}
|
||
.flatpickr-months .flatpickr-month,
|
||
.flatpickr-current-month{ color:var(--txt) !important; fill:var(--txt) !important; }
|
||
.flatpickr-current-month .flatpickr-monthDropdown-months,
|
||
.flatpickr-current-month input.cur-year{ color:var(--txt) !important; background:var(--field-bg) !important; }
|
||
.flatpickr-weekdays{ background:var(--field-bg) !important; }
|
||
span.flatpickr-weekday{ color:var(--muted) !important; font-size:11px; }
|
||
.flatpickr-day{
|
||
color:var(--txt) !important; border-radius:6px;
|
||
}
|
||
.flatpickr-day:hover{ background:var(--hover-2) !important; border-color:transparent !important; }
|
||
.flatpickr-day.today{ border-color:var(--blue) !important; }
|
||
.flatpickr-day.selected{ background:var(--blue) !important; color:var(--on-accent) !important; border-color:var(--blue) !important; }
|
||
.flatpickr-day.prevMonthDay,
|
||
.flatpickr-day.nextMonthDay{ color:var(--muted2) !important; }
|
||
.flatpickr-time input,
|
||
.flatpickr-time .flatpickr-am-pm{ color:var(--txt) !important; background:var(--field-bg) !important; }
|
||
.flatpickr-time input:hover,
|
||
.flatpickr-time input:focus{ background:var(--hover-2) !important; }
|
||
.numInputWrapper:hover{ background:var(--hover-2) !important; }
|
||
.flatpickr-months .flatpickr-prev-month,
|
||
.flatpickr-months .flatpickr-next-month{ fill:var(--txt-2) !important; }
|
||
.flatpickr-months .flatpickr-prev-month:hover svg,
|
||
.flatpickr-months .flatpickr-next-month:hover svg{ fill:var(--txt) !important; }
|
||
.tok-reset{
|
||
border:1px solid var(--line); border-radius:6px; padding:5px 10px;
|
||
font-size:12px; background:var(--field-bg); color:var(--muted); cursor:pointer;
|
||
}
|
||
.tok-reset:hover{ background:var(--hover-2); color:var(--txt-2); }
|
||
.tok-table{ width:100%; border-collapse:collapse; margin-top:14px; font-size:13px; }
|
||
.tok-table th{ text-align:left; padding:8px 12px; font-size:11px; color:var(--muted); background:var(--line-soft); font-weight:600; }
|
||
.tok-table th:not(:first-child){ text-align:right; }
|
||
.tok-table td{ padding:9px 12px; border-bottom:1px solid var(--line-soft); }
|
||
.tok-table td:not(:first-child){ text-align:right; color:var(--muted); font-size:12px; }
|
||
.tok-table td:first-child{ font-weight:600; color:var(--txt-strong); }
|
||
.tok-row-session{ cursor:pointer; }
|
||
.tok-row-session:hover td{ background:var(--hover-dim); }
|
||
.tok-row-session td:first-child::before{ content:'▶'; margin-right:6px; font-size:10px; color:var(--muted2); transition:transform .15s; display:inline-block; }
|
||
.tok-row-session.open td:first-child::before{ transform:rotate(90deg); }
|
||
.tok-detail td{ padding:5px 12px 5px 32px; font-size:11px; color:var(--muted); border-bottom:1px solid var(--line-soft); background:var(--field-bg); }
|
||
.tok-detail td:not(:first-child){ text-align:right; }
|
||
.tok-detail[hidden]{ display:none; }
|
||
.tok-model-tip{
|
||
position:relative; cursor:help; color:var(--blue);
|
||
border-bottom:1px dashed var(--muted2);
|
||
}
|
||
.tok-model-tip::after{
|
||
content:attr(data-tip); position:absolute; bottom:calc(100% + 6px); left:50%;
|
||
transform:translateX(-50%); white-space:pre-line; font-size:11px; line-height:1.5;
|
||
background:var(--card); color:var(--txt); border:1px solid var(--line);
|
||
border-radius:8px; padding:8px 10px; box-shadow:var(--shadow-pop);
|
||
pointer-events:none; opacity:0; transition:opacity .15s; z-index:100;
|
||
min-width:160px; text-align:left;
|
||
}
|
||
.tok-model-tip:hover::after{ opacity:1; }
|
||
.tok-pager{ display:flex; gap:4px; justify-content:center; margin-top:12px; }
|
||
.tok-pager button{
|
||
min-width:28px; height:28px; border:1px solid var(--line); border-radius:6px;
|
||
background:var(--card); color:var(--txt-2); font-size:12px; cursor:pointer;
|
||
}
|
||
.tok-pager button:hover{ background:var(--hover-2); }
|
||
.tok-pager button.active{ background:var(--blue); color:var(--on-accent); border-color:var(--blue); }
|
||
.tok-deleted{ margin-left:6px; font-size:10px; font-weight:400; color:var(--muted2); background:var(--line-soft); border-radius:3px; padding:1px 5px; }
|
||
.stat-row{ display:flex; gap:12px; margin:14px 0; }
|
||
.stat{ flex:1; border:1px solid var(--line); border-radius:var(--radius); background:var(--card); padding:16px; text-align:center; }
|
||
.s-n{ font-size:20px; font-weight:700; color:var(--txt-strong); }
|
||
.s-l{ font-size:11px; color:var(--muted); margin-top:4px; }
|
||
|
||
.composer{ position:relative; padding:12px 16px 16px; }
|
||
.composer-top{ display:flex; gap:8px; margin-bottom:8px; }
|
||
.chip{
|
||
border:1px solid var(--line); background:var(--card); border-radius:8px;
|
||
padding:5px 10px; font-size:12px; color:var(--txt-2); cursor:pointer;
|
||
display:inline-flex; align-items:center; gap:5px;
|
||
}
|
||
.chip.sm{ padding:4px 9px; font-size:11px; }
|
||
.chip-ic{ width:12px; height:12px; flex:0 0 auto; }
|
||
.composer .input{
|
||
width:100%; min-height:58px; resize:none; border:1px solid var(--line);
|
||
border-radius:var(--radius); padding:12px 14px; font-size:var(--chat-font); outline:none;
|
||
font-family:inherit; background:var(--card); color:var(--txt);
|
||
}
|
||
.input:focus{ border-color:var(--blue); }
|
||
.composer-bot{ display:flex; align-items:center; justify-content:space-between; margin-top:8px; }
|
||
.cb-left{ display:flex; align-items:center; gap:4px; }
|
||
.send{
|
||
position:relative;
|
||
width:34px; height:34px; border-radius:50%; border:none; cursor:pointer;
|
||
background:var(--blue); color:var(--on-accent);
|
||
display:flex; align-items:center; justify-content:center;
|
||
}
|
||
.send:disabled{ opacity:.7; cursor:not-allowed; }
|
||
.send.is-busy svg{ visibility:hidden; }
|
||
.send.is-busy::after{
|
||
content:''; position:absolute; inset:0; margin:auto;
|
||
width:16px; height:16px;
|
||
border:2px solid color-mix(in srgb, var(--on-accent) 35%, transparent);
|
||
border-top-color:var(--on-accent); border-radius:50%;
|
||
animation:ga-spin .65s linear infinite;
|
||
}
|
||
.send svg{ width:15px; height:15px; }
|
||
/* 运行中:发送键变红色停止键(点击=暂停当前回合)。回车仍走发送(打断重发)。 */
|
||
.send.is-stop{ background:var(--danger); cursor:pointer; }
|
||
.send.is-stop:hover{ background:var(--danger-dot); }
|
||
.send.is-stop svg{ display:none; }
|
||
.send.is-stop::after{
|
||
content:''; width:12px; height:12px; border-radius:3px;
|
||
background:var(--on-accent);
|
||
}
|
||
|
||
/* ============ ④ 右侧会话面板 ============ */
|
||
.rp-toggle, .sb-toggle{
|
||
position:relative; z-index:10; align-self:center;
|
||
width:20px; height:36px; border:1px solid var(--line); border-radius:6px;
|
||
background:var(--panel); cursor:pointer; display:flex; align-items:center; justify-content:center;
|
||
color:var(--txt-2); flex:0 0 auto; margin-right:-10px; margin-left:-10px;
|
||
opacity:.6; /* 与折叠态观感一致;hover 恢复满显 */
|
||
transition:color .15s, opacity .15s, width .2s, margin .2s;
|
||
}
|
||
.rp-toggle:hover, .sb-toggle:hover{ opacity:1; color:var(--txt-2); border-color:var(--line-strong); }
|
||
.rp-toggle svg, .sb-toggle svg{ width:14px; height:14px; transition:transform .2s; }
|
||
/* 视觉上压进对应面板内侧(不改变 flex 布局,仅位移) */
|
||
.rp-toggle{ transform:translateX(24px); }
|
||
.sb-toggle{ transform:translateX(-22px); }
|
||
|
||
.body.rp-collapsed .rp-toggle svg,
|
||
.body.sb-collapsed .sb-toggle svg{ transform:rotate(180deg); }
|
||
.body.rp-collapsed .rp-toggle{
|
||
position:absolute; right:7px; top:50%; transform:translateY(-50%);
|
||
margin:0; width:20px; opacity:.6;
|
||
}
|
||
.body.sb-collapsed .sb-toggle{
|
||
position:absolute; left:7px; top:50%; transform:translateY(-50%);
|
||
margin:0; width:20px; opacity:.6;
|
||
}
|
||
.body.rp-collapsed .rp-toggle:hover,
|
||
.body.sb-collapsed .sb-toggle:hover{ opacity:1; }
|
||
|
||
.rp-resize, .sb-resize{
|
||
width:4px; flex:0 0 4px; cursor:col-resize; border-radius:2px;
|
||
background:transparent; transition:background .15s; align-self:stretch;
|
||
position:relative; z-index:5; /* gap 缩小后会与面板重叠,提到面板之上保证可拖 */
|
||
}
|
||
.rp-resize{ margin-right:-10px; }
|
||
.sb-resize{ margin-left:-10px; }
|
||
.rp-resize:hover, .rp-resize.dragging,
|
||
.sb-resize:hover, .sb-resize.dragging{ background:var(--blue); }
|
||
.body.rp-collapsed .rp-resize,
|
||
.body.sb-collapsed .sb-resize{ display:none; }
|
||
|
||
/* 侧边栏折叠时整块隐藏 */
|
||
.body.sb-collapsed .sidebar{
|
||
width:0; flex:0 0 0; padding:0; border:none; opacity:0; pointer-events:none; overflow:hidden;
|
||
margin:0; display:none;
|
||
}
|
||
|
||
.rightpanel{
|
||
width:220px; flex:0 0 220px; background:var(--panel);
|
||
border:1px solid var(--line); border-radius:14px; box-shadow:var(--shadow);
|
||
overflow:hidden; padding:14px 12px;
|
||
display:flex; flex-direction:column; gap:10px;
|
||
transition:width .2s, padding .2s, opacity .15s, flex .2s;
|
||
}
|
||
.body.rp-collapsed .rightpanel{
|
||
width:0; flex:0 0 0; padding:0; border:none; opacity:0; pointer-events:none; overflow:hidden;
|
||
margin:0; display:none;
|
||
}
|
||
.search{
|
||
display:flex; align-items:center; gap:6px; border:1px solid var(--line);
|
||
border-radius:8px; padding:7px 10px; color:var(--muted); font-size:12px;
|
||
}
|
||
.search input{ border:none; outline:none; flex:1; font-size:12px; background:transparent; color:var(--txt); }
|
||
.search-ic{ width:14px; height:14px; color:var(--muted); flex:0 0 auto; }
|
||
.new-conv{
|
||
border:1px solid var(--line); background:var(--line-soft); border-radius:8px;
|
||
padding:9px; font-size:13px; color:var(--txt-2); cursor:pointer; font-weight:600;
|
||
display:flex; align-items:center; justify-content:center; gap:7px;
|
||
}
|
||
.new-conv svg{ width:14px; height:14px; }
|
||
.new-conv:hover{ background:var(--hover-2); }
|
||
.conv-list{ flex:1; display:flex; flex-direction:column; align-items:stretch; gap:6px; padding-top:8px; overflow:auto; }
|
||
.conv-empty{ color:var(--muted2); font-size:12px; }
|
||
.conv-item{ display:flex; align-items:center; gap:9px; padding:9px 10px; border-radius:8px; cursor:pointer; }
|
||
.conv-item:hover{ background:var(--line-soft); }
|
||
.conv-item.active{ background:var(--blue-bg); }
|
||
.ci-dot{ width:7px; height:7px; border-radius:50%; background:var(--ok); flex:0 0 auto; }
|
||
.conv-item.idle .ci-dot{ background:var(--dot-idle); }
|
||
.ci-main{ flex:1; min-width:0; }
|
||
.ci-title{ font-size:13px; font-weight:600; color:var(--txt-strong); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
|
||
.ci-pin{ width:14px; height:14px; color:var(--blue); margin-right:3px; vertical-align:-3px; flex:0 0 auto; display:inline-block; transform:rotate(45deg); transform-origin:50% 50%; }
|
||
.ci-meta{ font-size:11px; color:var(--muted); margin-top:2px; }
|
||
.ci-more{
|
||
flex:0 0 auto; width:22px; height:22px; border:none; background:transparent;
|
||
color:var(--muted2); border-radius:6px; cursor:pointer;
|
||
display:flex; align-items:center; justify-content:center;
|
||
opacity:0; transition:opacity .12s;
|
||
}
|
||
.ci-more svg{ width:16px; height:16px; }
|
||
.conv-item:hover .ci-more, .conv-item.active .ci-more{ opacity:1; }
|
||
.ci-more:hover{ background:var(--hover-dim); color:var(--txt-3); }
|
||
|
||
.ctx-menu{
|
||
position:fixed; z-index:200; min-width:124px; background:var(--card);
|
||
border:1px solid var(--line); border-radius:8px; padding:4px;
|
||
box-shadow:var(--shadow-pop);
|
||
}
|
||
.ctx-menu[hidden]{ display:none; }
|
||
.ctx-item{
|
||
display:flex; align-items:center; gap:8px; padding:8px 10px;
|
||
font-size:12px; border-radius:6px; cursor:pointer; color:var(--txt-strong); user-select:none;
|
||
}
|
||
.ctx-item svg{ width:15px; height:15px; flex:0 0 auto; }
|
||
.ctx-item:hover{ background:var(--line-soft); }
|
||
.ctx-item.danger{ color:var(--danger); }
|
||
.ctx-item.danger:hover{ background:var(--danger-bg); }
|
||
|
||
/* ─── chat composer: Plan/Auto toggle ─── */
|
||
.chip.on{
|
||
background:var(--blue-bg);
|
||
color:var(--blue);
|
||
border-color:var(--blue);
|
||
}
|
||
|
||
/* ─── chat composer: model dropdown menu ─── */
|
||
.ga-menu{
|
||
position:absolute;
|
||
background:var(--card);
|
||
border:1px solid var(--line);
|
||
border-radius:10px;
|
||
box-shadow:var(--shadow);
|
||
padding:4px;
|
||
min-width:160px;
|
||
z-index:50;
|
||
}
|
||
.ga-menu-item{
|
||
display:block;
|
||
width:100%;
|
||
text-align:left;
|
||
background:transparent;
|
||
border:0;
|
||
padding:6px 10px;
|
||
border-radius:6px;
|
||
font:inherit;
|
||
color:var(--txt-2);
|
||
cursor:pointer;
|
||
}
|
||
.ga-menu-item:hover{ background:var(--hover-2); }
|
||
.ga-menu-item.active{ color:var(--blue); }
|
||
|
||
/* ─── chat composer: image thumb strip ─── */
|
||
.thumb-strip{
|
||
display:flex;
|
||
flex-wrap:wrap;
|
||
gap:6px;
|
||
padding:6px 0;
|
||
}
|
||
.thumb{
|
||
position:relative;
|
||
width:48px;
|
||
height:48px;
|
||
border:1px solid var(--line);
|
||
border-radius:6px;
|
||
overflow:hidden;
|
||
background:var(--field-bg);
|
||
}
|
||
.thumb img{
|
||
width:100%;
|
||
height:100%;
|
||
object-fit:cover;
|
||
display:block;
|
||
}
|
||
.thumb .x{
|
||
position:absolute;
|
||
top:1px;
|
||
right:1px;
|
||
width:16px;
|
||
height:16px;
|
||
border-radius:50%;
|
||
border:0;
|
||
background:var(--card);
|
||
color:var(--txt-2);
|
||
font-size:11px;
|
||
line-height:14px;
|
||
cursor:pointer;
|
||
display:flex;
|
||
align-items:center;
|
||
justify-content:center;
|
||
padding:0;
|
||
}
|
||
.thumb .x:hover{ color:var(--danger); }
|
||
|
||
.file-chip{
|
||
position:relative;
|
||
display:inline-flex;
|
||
align-items:center;
|
||
gap:6px;
|
||
height:32px;
|
||
padding:0 28px 0 10px;
|
||
border:1px solid var(--line);
|
||
border-radius:6px;
|
||
background:var(--field-bg);
|
||
color:var(--txt);
|
||
font-size:12px;
|
||
max-width:220px;
|
||
}
|
||
.file-chip svg{
|
||
width:14px; height:14px;
|
||
color:var(--txt-2);
|
||
flex:0 0 auto;
|
||
}
|
||
.file-chip .fc-name{
|
||
white-space:nowrap;
|
||
overflow:hidden;
|
||
text-overflow:ellipsis;
|
||
}
|
||
.file-chip .x{
|
||
position:absolute;
|
||
top:50%;
|
||
right:4px;
|
||
transform:translateY(-50%);
|
||
width:18px; height:18px;
|
||
border-radius:50%;
|
||
border:0;
|
||
background:transparent;
|
||
color:var(--txt-2);
|
||
font-size:13px;
|
||
line-height:1;
|
||
cursor:pointer;
|
||
display:flex;
|
||
align-items:center;
|
||
justify-content:center;
|
||
padding:0;
|
||
}
|
||
.file-chip .x:hover{ color:var(--danger); }
|
||
|
||
/* ─── thumb-strip 里的文件 chip:升级成卡片样式(与消息中一致) ─── */
|
||
.thumb-strip .file-chip.pending{
|
||
height:auto;
|
||
min-height:52px;
|
||
padding:8px 32px 8px 8px;
|
||
gap:9px;
|
||
max-width:240px;
|
||
border-radius:10px;
|
||
background:var(--panel);
|
||
cursor:pointer;
|
||
transition:background .15s, border-color .15s, box-shadow .15s;
|
||
}
|
||
.thumb-strip .file-chip.pending:hover{
|
||
background:var(--hover-2);
|
||
border-color:var(--line-strong);
|
||
box-shadow:var(--shadow);
|
||
}
|
||
.thumb-strip .file-chip.pending .fc-icon{
|
||
width:32px; height:32px;
|
||
flex:0 0 auto;
|
||
border-radius:50%;
|
||
background:var(--blue-bg);
|
||
color:var(--blue);
|
||
display:flex; align-items:center; justify-content:center;
|
||
}
|
||
.thumb-strip .file-chip.pending .fc-icon svg{
|
||
width:16px; height:16px;
|
||
color:inherit;
|
||
}
|
||
.thumb-strip .file-chip.pending .fc-meta{
|
||
display:flex; flex-direction:column;
|
||
min-width:0;
|
||
line-height:1.25;
|
||
}
|
||
.thumb-strip .file-chip.pending .fc-name{
|
||
font-size:12px;
|
||
font-weight:600;
|
||
color:var(--txt-strong);
|
||
white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
|
||
}
|
||
.thumb-strip .file-chip.pending .fc-sub{
|
||
font-size:11px;
|
||
color:var(--muted);
|
||
margin-top:1px;
|
||
}
|
||
|
||
/* ─── chat panel: drag-over overlay ─── */
|
||
.main.dragover{ position:relative; }
|
||
.main.dragover::after{
|
||
content: attr(data-drop-hint);
|
||
position:absolute; inset:0;
|
||
display:flex; align-items:center; justify-content:center;
|
||
background:var(--blue-bg);
|
||
color:var(--blue);
|
||
border:2px dashed var(--blue);
|
||
border-radius:14px;
|
||
font-size:15px; font-weight:600;
|
||
pointer-events:none;
|
||
z-index:50;
|
||
}
|
||
|
||
/* ─── message bubble: image attachments (Gemini-style: image floats free, text in its own bubble) ─── */
|
||
.user-stack{
|
||
display:flex; flex-direction:column; align-items:flex-end;
|
||
gap:6px; max-width:80%;
|
||
}
|
||
.user-imgs{
|
||
display:flex; flex-wrap:wrap; gap:4px;
|
||
justify-content:flex-end;
|
||
}
|
||
.user-imgs img{
|
||
width:120px; height:120px;
|
||
border-radius:12px;
|
||
background:var(--field-bg);
|
||
object-fit:cover;
|
||
cursor:zoom-in;
|
||
display:block;
|
||
}
|
||
.user-files{
|
||
display:flex; flex-direction:column; gap:6px;
|
||
align-items:flex-end;
|
||
}
|
||
.user-files .file-chip{
|
||
height:auto;
|
||
min-height:56px;
|
||
padding:10px 14px 10px 10px;
|
||
gap:10px;
|
||
max-width:280px;
|
||
border-radius:12px;
|
||
background:var(--panel);
|
||
cursor:pointer;
|
||
transition:background .15s, border-color .15s, box-shadow .15s, transform .15s;
|
||
}
|
||
.user-files .file-chip:hover{
|
||
background:var(--hover-2);
|
||
border-color:var(--line-strong);
|
||
box-shadow:var(--shadow);
|
||
transform:translateY(-1px);
|
||
}
|
||
.user-files .file-chip .fc-icon{
|
||
width:36px; height:36px;
|
||
flex:0 0 auto;
|
||
border-radius:50%;
|
||
background:var(--blue-bg);
|
||
color:var(--blue);
|
||
display:flex; align-items:center; justify-content:center;
|
||
}
|
||
.user-files .file-chip .fc-icon svg{
|
||
width:18px; height:18px;
|
||
color:inherit;
|
||
}
|
||
.user-files .file-chip .fc-meta{
|
||
display:flex; flex-direction:column;
|
||
min-width:0;
|
||
line-height:1.25;
|
||
}
|
||
.user-files .file-chip .fc-name{
|
||
font-size:13px;
|
||
font-weight:600;
|
||
color:var(--txt-strong);
|
||
white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
|
||
}
|
||
.user-files .file-chip .fc-sub{
|
||
font-size:11px;
|
||
color:var(--muted);
|
||
margin-top:2px;
|
||
}
|
||
.user-stack .bubble{ max-width:100%; }
|
||
|
||
/* ─── lightbox (image preview) ─── */
|
||
.lightbox{
|
||
position:fixed; inset:0; z-index:600;
|
||
display:flex; align-items:center; justify-content:center;
|
||
}
|
||
.lightbox[hidden]{ display:none; }
|
||
.lightbox-backdrop{
|
||
position:absolute; inset:0;
|
||
background:var(--overlay);
|
||
}
|
||
.lightbox-img{
|
||
position:relative;
|
||
max-width:90vw; max-height:90vh;
|
||
border-radius:8px;
|
||
box-shadow:var(--shadow-modal);
|
||
background:var(--card);
|
||
}
|
||
.lightbox-x{
|
||
position:absolute; top:16px; right:16px;
|
||
width:36px; height:36px;
|
||
border:0; border-radius:50%;
|
||
background:var(--card); color:var(--txt-2);
|
||
font-size:20px; line-height:1;
|
||
cursor:pointer;
|
||
box-shadow:var(--shadow-pop);
|
||
display:flex; align-items:center; justify-content:center;
|
||
padding:0;
|
||
}
|
||
.lightbox-x:hover{ color:var(--danger); }
|
||
.thumb img{ cursor:zoom-in; }
|
||
|
||
/* ─── 自定义预设:卡上的删除按钮 ─── */
|
||
.fcard{ position:relative; }
|
||
.fcard .fc-x{
|
||
position:absolute; top:6px; right:6px;
|
||
width:20px; height:20px;
|
||
border:0; border-radius:50%;
|
||
background:var(--card); color:var(--txt-2);
|
||
font-size:14px; line-height:1;
|
||
cursor:pointer;
|
||
box-shadow:var(--shadow);
|
||
display:none; align-items:center; justify-content:center;
|
||
padding:0;
|
||
}
|
||
.fcard:hover .fc-x{ display:flex; }
|
||
.fcard .fc-x:hover{ color:var(--danger); }
|
||
|
||
/* ─── 自定义预设 modal 表单 ─── */
|
||
.cp-body{
|
||
padding:18px; display:flex; flex-direction:column; gap:12px;
|
||
min-height:0;
|
||
}
|
||
.cp-input, .cp-textarea{
|
||
width:100%; box-sizing:border-box;
|
||
padding:10px 12px;
|
||
background:var(--field-bg);
|
||
border:1px solid var(--line); border-radius:8px;
|
||
color:var(--txt); font:inherit;
|
||
outline:none;
|
||
}
|
||
.cp-input:focus, .cp-textarea:focus{ border-color:var(--blue); }
|
||
.cp-textarea{ resize:vertical; min-height:120px; }
|
||
.cp-error{
|
||
font-size:12px; color:var(--danger);
|
||
}
|
||
.cp-actions{
|
||
display:flex; justify-content:flex-end; gap:8px;
|
||
margin-top:4px;
|
||
}
|
||
.cp-btn{
|
||
padding:8px 16px;
|
||
border:1px solid var(--line); border-radius:8px;
|
||
background:var(--card); color:var(--txt);
|
||
cursor:pointer; font:inherit;
|
||
}
|
||
.cp-btn:hover{ background:var(--hover-2); }
|
||
.cp-btn-primary{
|
||
background:var(--blue); color:var(--on-accent); border-color:var(--blue);
|
||
}
|
||
.cp-btn-primary:hover{ background:var(--blue); opacity:.9; }
|
||
|
||
.preset-restore{
|
||
margin-left:auto; margin-right:8px;
|
||
padding:5px 12px; font-size:12px;
|
||
border:1px solid var(--line); border-radius:6px;
|
||
background:var(--card); color:var(--txt-2);
|
||
cursor:pointer; font-family:inherit;
|
||
}
|
||
.preset-restore:hover{ background:var(--hover-2); color:var(--blue); border-color:var(--blue); }
|
||
.preset-restore[hidden]{ display:none; }
|
||
|
||
/* ═══════════════ Markdown 渲染增强 (from PR) ═══════════════ */
|
||
.fold-pre{ white-space:pre-wrap; word-break:break-word; max-height:300px; overflow:auto; }
|
||
.fold.fold-thinking{ border-left-color:var(--fold-thinking-border); }
|
||
.fold.fold-tool{ border-left-color:var(--fold-tool-border); }
|
||
.fold.fold-result{ border-left-color:var(--fold-result-border); }
|
||
.fold.fold-turn{ border-left-color:var(--fold-turn-border); }
|
||
.fold.fold-turn > summary{ font-weight:600; color:var(--txt-2); }
|
||
.fold.fold-retry{ border-left-color:var(--fold-retry-border); border-left-style:dashed; }
|
||
.fold.fold-retry > summary{ font-size:11px; color:var(--muted2); font-weight:400; }
|
||
.fold.fold-retry pre{ font-size:11px; color:var(--muted); }
|
||
/* ---- 代码块容器 + 复制按钮 ---- */
|
||
.bubble.md pre{ position:relative; background:var(--field-bg); border-radius:8px; padding:12px; overflow-x:auto; }
|
||
.bubble.md .fold pre{ position:static; background:transparent; border-radius:0; padding:6px 0; }
|
||
.bubble.md pre code{ font-size:.92em; }
|
||
.code-copy-btn{
|
||
position:absolute; top:6px; right:6px; z-index:1;
|
||
border:1px solid var(--line); background:var(--card); color:var(--muted);
|
||
border-radius:6px; padding:4px; font-size:0; cursor:pointer;
|
||
opacity:0; transition:opacity .15s, background .12s;
|
||
display:flex; align-items:center; justify-content:center;
|
||
}
|
||
.bubble.md pre:hover .code-copy-btn{ opacity:1; }
|
||
.code-copy-btn:hover{ background:var(--line-soft); color:var(--txt-2); }
|
||
.code-copy-btn svg{ width:14px; height:14px; }
|
||
/* ---- KaTeX 公式 ---- */
|
||
.katex-block{ display:block; text-align:center; margin:12px 0; overflow-x:auto; }
|
||
.katex-inline{ display:inline; }
|
||
.katex-block .katex{ font-size:1.1em; }
|
||
.latex-copy-btn{
|
||
position:absolute; top:4px; right:4px; z-index:1;
|
||
border:1px solid var(--line); background:var(--card); color:var(--muted);
|
||
border-radius:6px; padding:4px; font-size:0; cursor:pointer;
|
||
opacity:0; transition:opacity .15s, background .12s;
|
||
display:flex; align-items:center; justify-content:center;
|
||
}
|
||
.katex-block{ position:relative; }
|
||
.katex-block:hover .latex-copy-btn{ opacity:1; }
|
||
.latex-copy-btn:hover{ background:var(--line-soft); color:var(--txt-2); }
|
||
.latex-copy-btn svg{ width:14px; height:14px; }
|
||
/* ---- 气泡级复制按钮 (F2) ---- */
|
||
.bubble-copy-btn{
|
||
display:inline-flex; align-items:center; flex-basis:100%;
|
||
margin-top:2px; padding:2px 4px; border:none; background:none;
|
||
color:var(--muted); cursor:pointer; opacity:0; transition:opacity .15s;
|
||
}
|
||
.msg:hover .bubble-copy-btn{ opacity:1; }
|
||
.msg.user .bubble-copy-btn{ justify-content:flex-end; }
|
||
.msg.assistant .bubble-copy-btn{ justify-content:flex-start; }
|
||
.bubble-copy-btn:hover{ color:var(--txt-2); }
|
||
.bubble-copy-btn svg{ width:14px; height:14px; }
|
||
/* ---- highlight.js 适配 ---- */
|
||
.hljs{ background:transparent !important; padding:0 !important; }
|
||
html[data-appearance="dark"] .bubble.md{
|
||
--md-link:color-mix(in srgb, var(--blue) 42%, var(--txt-strong));
|
||
}
|
||
html[data-appearance="dark"] .bubble.md .katex{ color:var(--txt); }
|
||
html[data-appearance="dark"] .bubble.md a{ color:var(--md-link); }
|
||
html[data-appearance="dark"] .bubble.md :not(pre) > code{
|
||
background:var(--line-soft); border:1px solid var(--line); color:var(--txt);
|
||
}
|
||
html[data-appearance="dark"] .bubble.md pre{
|
||
background:var(--line-soft); border-color:var(--line-strong);
|
||
}
|
||
html[data-appearance="dark"] .bubble.md pre code{ color:var(--txt-2); }
|
||
/* ---- 打字机光标 ---- */
|
||
.cursor-blink::after{
|
||
content:'▍'; animation:blink 1s step-end infinite; color:var(--blue);
|
||
}
|
||
@keyframes blink{ 50%{ opacity:0; } }
|
||
/* —— 最后一轮 summary 弱化显示 —— */
|
||
.turn-summary{
|
||
display:block; font-style:italic; color:var(--muted);
|
||
font-size:12px; margin-bottom:6px;
|
||
}
|
||
/* 历史轮 <summary> 头部的副标题(来自模型 <summary> 抽取) */
|
||
.fold-turn > summary .turn-head-sum{
|
||
font-style:italic; color:var(--muted); font-weight:normal; margin-left:4px;
|
||
}
|
||
|
||
/* —— 消息计时 badge —— */
|
||
.task-elapsed{
|
||
display:block; font-size:11px; color:var(--muted);
|
||
line-height:18px; min-height:18px;
|
||
padding:0 6px; margin-bottom:2px;
|
||
border-radius:var(--radius-sm);
|
||
}
|