fix(desktop): external gateway mode and start script alignment

- Add desktop env for non-embedded gateway (OCLAW_DESKTOP_EMBED_BACKEND, base URL, skip channel).
- Wire start_all/start_desktop to pass gateway URL when keeping existing gateway; fix root start_all flags.
- Prefer electron.cmd for background desktop launch; admin static theme presets and chat boot timeouts.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-05-06 11:06:16 +08:00
parent 19e51e2c12
commit 16169b3de2
12 changed files with 566 additions and 45 deletions

View file

@ -0,0 +1,233 @@
/* Classic admin/chat palettes: override CSS variables on body.theme-ds-body[data-admin-theme="…"].
Default (no attribute or deepseek) stays in theme-deepseek.css. */
body.theme-ds-body[data-admin-theme="github"] {
--ds-bg: #0d1117;
--ds-chat-main: #010409;
--ds-surface: #161b22;
--ds-surface-2: #21262d;
--ds-border: rgba(240, 246, 252, 0.1);
--ds-text: #f0f6fc;
--ds-text-muted: rgba(240, 246, 252, 0.55);
--ds-accent: #58a6ff;
--ds-accent-soft: rgba(88, 166, 255, 0.16);
--ds-sidebar: #161b22;
--ds-topbar-bg: rgba(22, 27, 34, 0.94);
--ds-accent-border: rgba(88, 166, 255, 0.32);
--ds-accent-border-strong: rgba(88, 166, 255, 0.55);
--ds-accent-link: rgba(88, 166, 255, 0.95);
--ds-accent-scrollbar: rgba(88, 166, 255, 0.45);
--ds-accent-scrollbar-hover: rgba(88, 166, 255, 0.68);
--ds-panel: #21262d;
--ds-chat-scroll-track: #21262d;
--ds-chat-scroll-thumb: #484f58;
--ds-chat-scroll-thumb-hover: #6e7681;
--chat-sess-hover-bg: rgba(240, 246, 252, 0.06);
--chat-sess-active-bg: rgba(240, 246, 252, 0.08);
--chat-sess-border: rgba(240, 246, 252, 0.12);
}
body.theme-ds-body[data-admin-theme="nord"] {
--ds-bg: #2e3440;
--ds-chat-main: #242933;
--ds-surface: #3b4252;
--ds-surface-2: #434c5e;
--ds-border: rgba(236, 239, 244, 0.12);
--ds-text: #eceff4;
--ds-text-muted: rgba(236, 239, 244, 0.55);
--ds-accent: #88c0d0;
--ds-accent-soft: rgba(136, 192, 208, 0.2);
--ds-sidebar: #3b4252;
--ds-topbar-bg: rgba(59, 66, 82, 0.95);
--ds-accent-border: rgba(136, 192, 208, 0.35);
--ds-accent-border-strong: rgba(136, 192, 208, 0.55);
--ds-accent-link: rgba(143, 188, 187, 0.98);
--ds-accent-scrollbar: rgba(136, 192, 208, 0.5);
--ds-accent-scrollbar-hover: rgba(143, 188, 187, 0.75);
--ds-panel: #434c5e;
--ds-chat-scroll-track: #3b4252;
--ds-chat-scroll-thumb: #5e81ac;
--ds-chat-scroll-thumb-hover: #81a1c1;
--chat-user-bubble-bg: #a3be8c;
--chat-user-bubble-fg: #2e3440;
}
body.theme-ds-body[data-admin-theme="dracula"] {
--ds-bg: #282a36;
--ds-chat-main: #1e1f29;
--ds-surface: #44475a;
--ds-surface-2: #6272a4;
--ds-border: rgba(248, 248, 242, 0.1);
--ds-text: #f8f8f2;
--ds-text-muted: rgba(248, 248, 242, 0.55);
--ds-accent: #bd93f9;
--ds-accent-soft: rgba(189, 147, 249, 0.22);
--ds-sidebar: #44475a;
--ds-topbar-bg: rgba(68, 71, 90, 0.95);
--ds-accent-border: rgba(189, 147, 249, 0.4);
--ds-accent-border-strong: rgba(189, 147, 249, 0.6);
--ds-accent-link: rgba(255, 121, 198, 0.95);
--ds-accent-scrollbar: rgba(189, 147, 249, 0.5);
--ds-accent-scrollbar-hover: rgba(255, 121, 198, 0.65);
--ds-panel: #44475a;
--ds-chat-scroll-track: #21222c;
--ds-chat-scroll-thumb: #6272a4;
--ds-chat-scroll-thumb-hover: #bd93f9;
}
body.theme-ds-body[data-admin-theme="forest"] {
--ds-bg: #0c1412;
--ds-chat-main: #070d0b;
--ds-surface: #13251f;
--ds-surface-2: #1a332b;
--ds-border: rgba(167, 243, 208, 0.1);
--ds-text: #ecfdf5;
--ds-text-muted: rgba(209, 250, 229, 0.55);
--ds-accent: #34d399;
--ds-accent-soft: rgba(52, 211, 153, 0.18);
--ds-sidebar: #13251f;
--ds-topbar-bg: rgba(19, 37, 31, 0.94);
--ds-accent-border: rgba(52, 211, 153, 0.35);
--ds-accent-border-strong: rgba(52, 211, 153, 0.55);
--ds-accent-link: rgba(110, 231, 183, 0.95);
--ds-accent-scrollbar: rgba(52, 211, 153, 0.45);
--ds-accent-scrollbar-hover: rgba(110, 231, 183, 0.7);
--ds-panel: #1a332b;
--ds-chat-scroll-track: #13251f;
--ds-chat-scroll-thumb: #047857;
--ds-chat-scroll-thumb-hover: #059669;
}
body.theme-ds-body[data-admin-theme="catppuccin"] {
--ds-bg: #1e1e2e;
--ds-chat-main: #181825;
--ds-surface: #313244;
--ds-surface-2: #45475a;
--ds-border: rgba(205, 214, 244, 0.1);
--ds-text: #cdd6f4;
--ds-text-muted: rgba(205, 214, 244, 0.52);
--ds-accent: #89b4fa;
--ds-accent-soft: rgba(137, 180, 250, 0.2);
--ds-sidebar: #313244;
--ds-topbar-bg: rgba(49, 50, 68, 0.95);
--ds-accent-border: rgba(137, 180, 250, 0.38);
--ds-accent-border-strong: rgba(137, 180, 250, 0.58);
--ds-accent-link: rgba(166, 218, 249, 0.96);
--ds-accent-scrollbar: rgba(137, 180, 250, 0.48);
--ds-accent-scrollbar-hover: rgba(166, 218, 249, 0.72);
--ds-panel: #45475a;
--ds-chat-scroll-track: #313244;
--ds-chat-scroll-thumb: #6c7086;
--ds-chat-scroll-thumb-hover: #89b4fa;
}
/* Light: same pipeline as dark presets (CSS variables on body) + a small set of chat/sidebar
tweaks where theme-deepseek.css still used “white mist” tints meant for dark canvases. */
body.theme-ds-body[data-admin-theme="light"] {
--ds-bg: #f1f5f9;
--ds-chat-main: #ffffff;
--ds-surface: #ffffff;
--ds-surface-2: #e2e8f0;
--ds-border: rgba(15, 23, 42, 0.12);
--ds-text: #0f172a;
--ds-text-muted: rgba(15, 23, 42, 0.55);
--ds-accent: #2563eb;
--ds-accent-soft: rgba(37, 99, 235, 0.14);
--ds-sidebar: #f8fafc;
--ds-topbar-bg: rgba(248, 250, 252, 0.92);
--ds-accent-border: rgba(37, 99, 235, 0.35);
--ds-accent-border-strong: rgba(37, 99, 235, 0.55);
--ds-accent-link: #1d4ed8;
--ds-accent-scrollbar: rgba(37, 99, 235, 0.42);
--ds-accent-scrollbar-hover: rgba(29, 78, 216, 0.62);
--ds-panel: #ffffff;
--ds-chat-scroll-track: #e2e8f0;
--ds-chat-scroll-thumb: #94a3b8;
--ds-chat-scroll-thumb-hover: #64748b;
--chat-sess-hover-bg: rgba(15, 23, 42, 0.06);
--chat-sess-active-bg: rgba(15, 23, 42, 0.09);
--chat-sess-border: rgba(15, 23, 42, 0.1);
--chat-user-bubble-bg: #10b981;
--chat-user-bubble-fg: #ffffff;
}
body.theme-ds-body[data-admin-theme="light"] .nav__groupTitle {
color: rgba(15, 23, 42, 0.48);
}
body.theme-ds-body[data-admin-theme="light"] .brand__sub {
color: rgba(15, 23, 42, 0.55);
}
body.theme-ds-body[data-admin-theme="light"] .chat-nav__newGlyph {
background-color: rgba(15, 23, 42, 0.08);
}
body.theme-ds-body[data-admin-theme="light"] .chat-nav__new:hover .chat-nav__newGlyph {
background-color: rgba(15, 23, 42, 0.14);
}
body.theme-ds-body[data-admin-theme="light"] .chat-nav__newGlyph::before,
body.theme-ds-body[data-admin-theme="light"] .chat-nav__newGlyph::after {
background-color: #0f172a;
}
body.theme-ds-body[data-admin-theme="light"] .chat-avatar--bot,
body.theme-ds-body[data-admin-theme="light"] .chat-avatar--userBuiltin {
background: rgba(15, 23, 42, 0.06);
}
body.theme-ds-body[data-admin-theme="light"] .chat-msg--assistant {
background: rgba(15, 23, 42, 0.045);
border-color: var(--ds-border);
}
body.theme-ds-body[data-admin-theme="light"] .chat-msg__action-btn {
border-color: rgba(15, 23, 42, 0.2);
color: rgba(15, 23, 42, 0.78);
}
body.theme-ds-body[data-admin-theme="light"] .chat-msg__action-btn:hover {
background: rgba(15, 23, 42, 0.06);
}
body.theme-ds-body[data-admin-theme="light"] .chat-msg--tool {
background: rgba(15, 23, 42, 0.06);
border-color: rgba(15, 23, 42, 0.18);
color: rgba(15, 23, 42, 0.88);
}
body.theme-ds-body[data-admin-theme="light"] .chat-msg--thinking {
background: rgba(15, 23, 42, 0.04);
border-color: rgba(15, 23, 42, 0.12);
}
body.theme-ds-body[data-admin-theme="light"] .chat-task-stage {
border-color: rgba(15, 23, 42, 0.12);
background: rgba(15, 23, 42, 0.03);
}
body.theme-ds-body[data-admin-theme="light"] .chat-task-stage__toggle {
border-color: rgba(15, 23, 42, 0.14);
background: rgba(15, 23, 42, 0.04);
}
body.theme-ds-body[data-admin-theme="light"] .chat-composer {
border-top-color: rgba(15, 23, 42, 0.08);
}
body.theme-ds-body[data-admin-theme="light"] .chat-msg__reasoning {
border-color: rgba(15, 23, 42, 0.1);
background: rgba(15, 23, 42, 0.03);
}
body.theme-ds-body[data-admin-theme="light"] .chat-msg__reasoning-pre {
background: rgba(15, 23, 42, 0.05);
border-color: rgba(15, 23, 42, 0.08);
color: var(--ds-text);
}
body.theme-ds-body[data-admin-theme="light"] .chat-msg__md .mermaid {
border-color: rgba(15, 23, 42, 0.14);
background: rgba(248, 250, 252, 0.95);
}