mirror of
https://github.com/moltbot/moltbot.git
synced 2026-03-30 01:06:11 +00:00
* feat(ui): add chat infrastructure modules (slice 1 of dashboard-v2) New self-contained chat modules extracted from dashboard-v2-structure: - chat/slash-commands.ts: slash command definitions and completions - chat/slash-command-executor.ts: execute slash commands via gateway RPC - chat/slash-command-executor.node.test.ts: test coverage - chat/speech.ts: speech-to-text (STT) support - chat/input-history.ts: per-session input history navigation - chat/pinned-messages.ts: pinned message management - chat/deleted-messages.ts: deleted message tracking - chat/export.ts: shared exportChatMarkdown helper - chat-export.ts: re-export shim for backwards compat Gateway fix: - Restore usage/cost stripping in chat.history sanitization - Add test coverage for sanitization behavior These modules are additive and tree-shaken — no existing code imports them yet. They will be wired in subsequent slices. * feat(ui): add utilities, theming, and i18n updates (slice 2 of dashboard-v2) UI utilities and theming improvements extracted from dashboard-v2-structure: Icons & formatting: - icons.ts: expanded icon set for new dashboard views - format.ts: date/number formatting helpers - tool-labels.ts: human-readable tool name mappings Theming: - theme.ts: enhanced theme resolution and system theme support - theme-transition.ts: simplified transition logic - storage.ts: theme parsing improvements for settings persistence Navigation & types: - navigation.ts: extended tab definitions for dashboard-v2 - app-view-state.ts: expanded view state management - types.ts: new type definitions (HealthSummary, ModelCatalogEntry, etc.) Components: - components/dashboard-header.ts: reusable header component i18n: - Updated en, pt-BR, zh-CN, zh-TW locales with new dashboard strings All changes are additive or backwards-compatible. Build passes. Part of #36853. * feat(ui): dashboard-v2 views refactor (slice 3 of dashboard-v2) Complete views refactor from dashboard-v2-structure, building on slice 1 (chat infra, #41497) and slice 2 (utilities/theming, #41500). Core app wiring: - app.ts: updated host component with new state properties - app-render.ts: refactored render pipeline for new dashboard layout - app-render.helpers.ts: extracted render helpers - app-settings.ts: theme listener lifecycle fix, cron runs on tab load - app-gateway.ts: refactored chat event handling - app-chat.ts: slash command integration New views: - views/command-palette.ts: command palette (Cmd+K) - views/login-gate.ts: authentication gate - views/bottom-tabs.ts: mobile tab navigation - views/overview-*.ts: modular overview dashboard (cards, attention, event log, hints, log tail, quick actions) - views/agents-panels-overview.ts: agent overview panel Refactored views: - views/chat.ts: major refactor with STT, slash commands, search, export, pinned messages, input history - views/config.ts: restructured config management - views/agents.ts: streamlined agent management - views/overview.ts: modular composition from sub-views - views/sessions.ts: enhanced session management Controllers: - controllers/health.ts: new health check controller - controllers/models.ts: new model catalog controller - controllers/agents.ts: tools catalog improvements - controllers/config.ts: config form enhancements Tests & infrastructure: - Updated test helpers, browser tests, node tests - vite.config.ts: build configuration updates - markdown.ts: rendering improvements Build passes ✅ | 44 files | +6,626/-1,499 Part of #36853. Depends on #41497 and #41500. * UI: fix chat review follow-ups * fix(ui): repair chat clear and attachment regressions * fix(ui): address remaining chat review comments * fix(ui): address review follow-ups * fix(ui): replay queued local slash commands * fix(ui): repair control-ui type drift * fix(ui): restore control UI styling * feat(ui): enhance layout and styling for config and topbar components - Updated grid layout for the config layout to allow full-width usage. - Introduced new styles for top tabs and search components to improve usability. - Added theme mode toggle styling for better visual integration. - Implemented tests for layout and theme mode components to ensure proper rendering and functionality. * feat(ui): add config file opening functionality and enhance styles - Implemented a new handler to open the configuration file using the default application based on the operating system. - Updated various CSS styles across components for improved visual consistency and usability, including adjustments to padding, margins, and font sizes. - Introduced new styles for the data table and sidebar components to enhance layout and interaction. - Added tests for the collapsed navigation rail to ensure proper functionality in different states. * refactor(ui): update CSS styles for improved layout and consistency - Simplified font-body declaration in base.css for cleaner code. - Adjusted transition properties in components.css for better readability. - Added new .workspace-link class in components.css for enhanced link styling. - Changed config layout from grid to flex in config.css for better responsiveness. - Updated related tests to reflect layout changes in config-layout.browser.test.ts. * feat(ui): enhance theme handling and loading states in chat interface - Updated CSS to support new theme mode attributes for better styling consistency across light and dark themes. - Introduced loading skeletons in the chat view to improve user experience during data fetching. - Refactored command palette to manage focus more effectively, enhancing accessibility. - Added tests for the appearance theme picker and loading states to ensure proper rendering and functionality. * refactor(ui): streamline ephemeral state management in chat and config views - Introduced interfaces for ephemeral state in chat and config views to encapsulate related variables. - Refactored state management to utilize a single object for better organization and maintainability. - Removed legacy state variables and updated related functions to reference the new state structure. - Enhanced readability and consistency across the codebase by standardizing state handling. * chore: remove test files to reduce PR scope * fix(ui): resolve type errors in debug props and chat search * refactor(ui): remove stream mode functionality across various components - Eliminated stream mode related translations and CSS styles to streamline the user interface. - Updated multiple components to remove references to stream mode, enhancing code clarity and maintainability. - Adjusted rendering logic in views to ensure consistent behavior without stream mode. - Improved overall readability by cleaning up unused variables and props. * fix(ui): add msg-meta CSS and fix rebase type errors * fix(ui): add CSS for chat footer action buttons (TTS, delete) and msg-meta * feat(ui): add delete confirmation with remember-decision checkbox * fix(ui): delete confirmation with remember, attention icon sizing * fix(ui): open delete confirm popover to the left (not clipped) * fix(ui): show all nav items in collapsed sidebar, remove gap * fix(ui): address P1/P2 review feedback — session queue clear, kill scope, palette guard, stop button * fix(ui): address Greptile re-review — kill scope, queue flush, idle handling, parallel fetch - SECURITY: /kill <target> now enforces session tree scope (not just /kill all) - /kill reports idle sessions gracefully instead of throwing - Queue continues draining after local slash commands - /model fetches sessions.list + models.list in parallel (perf fix) * fix(ui): style update banner close button — SVG stroke + sizing * fix(ui): update layout styles for sidebar and content spacing * UI: restore colon slash command parsing * UI: restore slash command session queries * Refactor thinking resolution: Introduce resolveThinkingDefaultForModel function and update model-selection to utilize it. Add tests for new functionality in thinking.test.ts. * fix(ui): constrain welcome state logo size, add missing CSS for new session view --------- Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
930 lines
18 KiB
CSS
930 lines
18 KiB
CSS
/* =============================================
|
|
CHAT CARD LAYOUT - Flex container with sticky compose
|
|
============================================= */
|
|
|
|
/* Main chat card - flex column layout, transparent background */
|
|
.chat {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
flex: 1 1 0;
|
|
height: 100%;
|
|
min-height: 0; /* Allow flex shrinking */
|
|
overflow: hidden;
|
|
background: transparent !important;
|
|
border: none !important;
|
|
box-shadow: none !important;
|
|
}
|
|
|
|
/* Chat header - fixed at top, transparent */
|
|
.chat-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: 12px;
|
|
flex-wrap: nowrap;
|
|
flex-shrink: 0;
|
|
padding-bottom: 12px;
|
|
margin-bottom: 12px;
|
|
background: transparent;
|
|
}
|
|
|
|
.chat-header__left {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
min-width: 0;
|
|
}
|
|
|
|
.chat-header__right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
.chat-session {
|
|
min-width: 180px;
|
|
}
|
|
|
|
/* Chat thread - scrollable middle section, transparent */
|
|
.chat-thread {
|
|
flex: 1 1 0; /* Grow, shrink, and use 0 base for proper scrolling */
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
padding: 12px 4px;
|
|
margin: 0 -4px;
|
|
min-height: 0; /* Allow shrinking for flex scroll behavior */
|
|
border-radius: 12px;
|
|
background: transparent;
|
|
}
|
|
|
|
/* Focus mode exit button */
|
|
.chat-focus-exit {
|
|
position: absolute;
|
|
top: 12px;
|
|
right: 12px;
|
|
z-index: 100;
|
|
width: 32px;
|
|
height: 32px;
|
|
border-radius: 50%;
|
|
border: 1px solid var(--border);
|
|
background: var(--panel);
|
|
color: var(--muted);
|
|
font-size: 20px;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition:
|
|
background 150ms ease-out,
|
|
color 150ms ease-out,
|
|
border-color 150ms ease-out;
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.chat-focus-exit:hover {
|
|
background: var(--panel-strong);
|
|
color: var(--text);
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.chat-focus-exit svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
stroke: currentColor;
|
|
fill: none;
|
|
stroke-width: 2px;
|
|
stroke-linecap: round;
|
|
stroke-linejoin: round;
|
|
}
|
|
|
|
/* New messages indicator - floating pill above compose */
|
|
.chat-new-messages {
|
|
align-self: center;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
padding: 6px 14px;
|
|
margin: 8px auto;
|
|
font-size: 13px;
|
|
font-family: var(--font-body);
|
|
color: var(--text);
|
|
background: var(--panel-strong);
|
|
border: 1px solid var(--border);
|
|
border-radius: 999px;
|
|
cursor: pointer;
|
|
white-space: nowrap;
|
|
z-index: 10;
|
|
transition:
|
|
background 150ms ease-out,
|
|
border-color 150ms ease-out;
|
|
}
|
|
|
|
.chat-new-messages:hover {
|
|
background: var(--panel);
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.chat-new-messages svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
stroke: currentColor;
|
|
fill: none;
|
|
stroke-width: 1.5px;
|
|
stroke-linecap: round;
|
|
stroke-linejoin: round;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
/* Chat compose - sticky at bottom */
|
|
.chat-compose {
|
|
position: sticky;
|
|
bottom: 0;
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
margin-top: auto; /* Push to bottom of flex container */
|
|
padding: 12px 4px 4px;
|
|
background: linear-gradient(to bottom, transparent, var(--bg) 20%);
|
|
z-index: 10;
|
|
}
|
|
|
|
/* Image attachments preview */
|
|
.chat-attachments {
|
|
display: inline-flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
padding: 8px;
|
|
background: var(--panel);
|
|
border-radius: 8px;
|
|
border: 1px solid var(--border);
|
|
width: fit-content;
|
|
max-width: 100%;
|
|
align-self: flex-start; /* Don't stretch in flex column parent */
|
|
}
|
|
|
|
.chat-attachment {
|
|
position: relative;
|
|
width: 80px;
|
|
height: 80px;
|
|
border-radius: 6px;
|
|
overflow: hidden;
|
|
border: 1px solid var(--border);
|
|
background: var(--bg);
|
|
}
|
|
|
|
.chat-attachment__img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: contain;
|
|
}
|
|
|
|
.chat-attachment__remove {
|
|
position: absolute;
|
|
top: 4px;
|
|
right: 4px;
|
|
width: 20px;
|
|
height: 20px;
|
|
border-radius: 50%;
|
|
border: none;
|
|
background: rgba(0, 0, 0, 0.7);
|
|
color: #fff;
|
|
font-size: 12px;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
opacity: 0;
|
|
transition: opacity 150ms ease-out;
|
|
}
|
|
|
|
.chat-attachment:hover .chat-attachment__remove {
|
|
opacity: 1;
|
|
}
|
|
|
|
.chat-attachment__remove:hover {
|
|
background: rgba(220, 38, 38, 0.9);
|
|
}
|
|
|
|
.chat-attachment__remove svg {
|
|
width: 12px;
|
|
height: 12px;
|
|
stroke: currentColor;
|
|
fill: none;
|
|
stroke-width: 2px;
|
|
}
|
|
|
|
/* Light theme attachment overrides */
|
|
:root[data-theme-mode="light"] .chat-attachments {
|
|
background: #f8fafc;
|
|
border-color: rgba(16, 24, 40, 0.1);
|
|
}
|
|
|
|
:root[data-theme-mode="light"] .chat-attachment {
|
|
border-color: rgba(16, 24, 40, 0.15);
|
|
background: #fff;
|
|
}
|
|
|
|
:root[data-theme-mode="light"] .chat-attachment__remove {
|
|
background: rgba(0, 0, 0, 0.6);
|
|
}
|
|
|
|
/* Message images (sent images displayed in chat) */
|
|
.chat-message-images {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.chat-message-image {
|
|
max-width: 300px;
|
|
max-height: 200px;
|
|
border-radius: 8px;
|
|
object-fit: contain;
|
|
cursor: pointer;
|
|
transition: transform 150ms ease-out;
|
|
}
|
|
|
|
.chat-message-image:hover {
|
|
transform: scale(1.02);
|
|
}
|
|
|
|
/* User message images align right */
|
|
.chat-group.user .chat-message-images {
|
|
justify-content: flex-end;
|
|
}
|
|
|
|
/* Compose input row - horizontal layout */
|
|
.chat-compose__row {
|
|
display: flex;
|
|
align-items: stretch;
|
|
gap: 12px;
|
|
flex: 1;
|
|
}
|
|
|
|
:root[data-theme-mode="light"] .chat-compose {
|
|
background: linear-gradient(to bottom, transparent, var(--bg-content) 20%);
|
|
}
|
|
|
|
.chat-compose__field {
|
|
flex: 1 1 auto;
|
|
min-width: 0;
|
|
display: flex;
|
|
align-items: stretch;
|
|
}
|
|
|
|
/* Hide the "Message" label - keep textarea only */
|
|
.chat-compose__field > span {
|
|
display: none;
|
|
}
|
|
|
|
/* Override .field textarea min-height (180px) from components.css */
|
|
.chat-compose .chat-compose__field textarea {
|
|
width: 100%;
|
|
height: 40px;
|
|
min-height: 40px;
|
|
max-height: 150px;
|
|
padding: 9px 12px;
|
|
border-radius: 8px;
|
|
overflow-y: auto;
|
|
resize: none;
|
|
white-space: pre-wrap;
|
|
font-family: var(--font-body);
|
|
font-size: 14px;
|
|
line-height: 1.45;
|
|
}
|
|
|
|
.chat-compose__field textarea:disabled {
|
|
opacity: 0.7;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.chat-compose__actions {
|
|
flex-shrink: 0;
|
|
display: flex;
|
|
align-items: stretch;
|
|
gap: 8px;
|
|
}
|
|
|
|
.chat-compose .chat-compose__actions .btn {
|
|
padding: 0 16px;
|
|
font-size: 13px;
|
|
height: 40px;
|
|
min-height: 40px;
|
|
max-height: 40px;
|
|
line-height: 1;
|
|
white-space: nowrap;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.agent-chat__input {
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
margin: 0 18px 14px;
|
|
padding: 0;
|
|
background: var(--card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius-lg);
|
|
flex-shrink: 0;
|
|
overflow: hidden;
|
|
transition:
|
|
border-color var(--duration-fast) ease,
|
|
box-shadow var(--duration-fast) ease;
|
|
}
|
|
|
|
.agent-chat__input:focus-within {
|
|
border-color: color-mix(in srgb, var(--accent) 40%, transparent);
|
|
box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 8%, transparent);
|
|
}
|
|
|
|
@supports (backdrop-filter: blur(1px)) {
|
|
.agent-chat__input {
|
|
backdrop-filter: blur(12px) saturate(1.6);
|
|
-webkit-backdrop-filter: blur(12px) saturate(1.6);
|
|
}
|
|
}
|
|
|
|
.agent-chat__input > textarea {
|
|
width: 100%;
|
|
min-height: 40px;
|
|
max-height: 150px;
|
|
resize: none;
|
|
padding: 12px 14px 8px;
|
|
border: none;
|
|
background: transparent;
|
|
color: var(--text);
|
|
font-size: 0.92rem;
|
|
font-family: inherit;
|
|
line-height: 1.4;
|
|
outline: none;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
.agent-chat__input > textarea::placeholder {
|
|
color: var(--muted);
|
|
}
|
|
|
|
.agent-chat__toolbar {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 6px 10px;
|
|
border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
|
|
}
|
|
|
|
.agent-chat__toolbar-left,
|
|
.agent-chat__toolbar-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
}
|
|
|
|
.agent-chat__input-btn,
|
|
.agent-chat__toolbar .btn-ghost {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 30px;
|
|
height: 30px;
|
|
border-radius: var(--radius-sm);
|
|
border: none;
|
|
background: transparent;
|
|
color: var(--muted);
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
padding: 0;
|
|
transition: all var(--duration-fast) ease;
|
|
}
|
|
|
|
.agent-chat__input-btn svg,
|
|
.agent-chat__toolbar .btn-ghost svg {
|
|
width: 16px;
|
|
height: 16px;
|
|
stroke: currentColor;
|
|
fill: none;
|
|
stroke-width: 1.5px;
|
|
stroke-linecap: round;
|
|
stroke-linejoin: round;
|
|
}
|
|
|
|
.agent-chat__input-btn:hover:not(:disabled),
|
|
.agent-chat__toolbar .btn-ghost:hover:not(:disabled) {
|
|
color: var(--text);
|
|
background: var(--bg-hover);
|
|
}
|
|
|
|
.agent-chat__input-btn:disabled,
|
|
.agent-chat__toolbar .btn-ghost:disabled {
|
|
opacity: 0.4;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.agent-chat__input-btn--active {
|
|
color: var(--accent);
|
|
background: color-mix(in srgb, var(--accent) 12%, transparent);
|
|
}
|
|
|
|
.agent-chat__input-divider {
|
|
width: 1px;
|
|
height: 16px;
|
|
background: var(--border);
|
|
margin: 0 4px;
|
|
}
|
|
|
|
.agent-chat__token-count {
|
|
font-size: 0.7rem;
|
|
color: var(--muted);
|
|
white-space: nowrap;
|
|
flex-shrink: 0;
|
|
align-self: center;
|
|
}
|
|
|
|
.chat-send-btn {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 30px;
|
|
height: 30px;
|
|
border-radius: var(--radius-md);
|
|
border: none;
|
|
background: var(--accent);
|
|
color: var(--accent-foreground);
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
transition:
|
|
background var(--duration-fast) ease,
|
|
box-shadow var(--duration-fast) ease;
|
|
padding: 0;
|
|
}
|
|
|
|
.chat-send-btn svg {
|
|
width: 15px;
|
|
height: 15px;
|
|
stroke: currentColor;
|
|
fill: none;
|
|
stroke-width: 1.5px;
|
|
stroke-linecap: round;
|
|
stroke-linejoin: round;
|
|
}
|
|
|
|
.chat-send-btn:hover:not(:disabled) {
|
|
background: var(--accent-hover);
|
|
box-shadow: 0 2px 10px rgba(255, 92, 92, 0.25);
|
|
}
|
|
|
|
.chat-send-btn:disabled {
|
|
opacity: 0.3;
|
|
cursor: not-allowed;
|
|
}
|
|
|
|
.chat-send-btn--stop {
|
|
background: var(--danger);
|
|
}
|
|
|
|
.chat-send-btn--stop:hover:not(:disabled) {
|
|
background: color-mix(in srgb, var(--danger) 85%, #fff);
|
|
}
|
|
|
|
.slash-menu {
|
|
position: absolute;
|
|
bottom: 100%;
|
|
left: 0;
|
|
right: 0;
|
|
max-height: 320px;
|
|
overflow-y: auto;
|
|
background: var(--popover);
|
|
border: 1px solid var(--border-strong);
|
|
border-radius: var(--radius-lg);
|
|
box-shadow: var(--shadow-lg);
|
|
z-index: 30;
|
|
margin-bottom: 4px;
|
|
padding: 6px;
|
|
scrollbar-width: thin;
|
|
}
|
|
|
|
.slash-menu-group + .slash-menu-group {
|
|
margin-top: 4px;
|
|
padding-top: 4px;
|
|
border-top: 1px solid color-mix(in srgb, var(--border) 50%, transparent);
|
|
}
|
|
|
|
.slash-menu-group__label {
|
|
padding: 4px 10px 2px;
|
|
font-size: 0.68rem;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.06em;
|
|
color: var(--accent);
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.slash-menu-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 7px 10px;
|
|
border-radius: var(--radius-sm);
|
|
cursor: pointer;
|
|
transition:
|
|
background var(--duration-fast) ease,
|
|
color var(--duration-fast) ease;
|
|
}
|
|
|
|
.slash-menu-item:hover,
|
|
.slash-menu-item--active {
|
|
background: color-mix(in srgb, var(--accent) 10%, var(--bg-hover));
|
|
}
|
|
|
|
.slash-menu-icon {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 20px;
|
|
height: 20px;
|
|
flex-shrink: 0;
|
|
color: var(--accent);
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.slash-menu-icon svg {
|
|
width: 14px;
|
|
height: 14px;
|
|
stroke: currentColor;
|
|
fill: none;
|
|
stroke-width: 1.5px;
|
|
stroke-linecap: round;
|
|
stroke-linejoin: round;
|
|
}
|
|
|
|
.slash-menu-item--active .slash-menu-icon,
|
|
.slash-menu-item:hover .slash-menu-icon {
|
|
opacity: 1;
|
|
}
|
|
|
|
.slash-menu-name {
|
|
font-size: 0.82rem;
|
|
font-weight: 600;
|
|
font-family: var(--mono);
|
|
color: var(--accent);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.slash-menu-args {
|
|
font-size: 0.75rem;
|
|
color: var(--muted);
|
|
font-family: var(--mono);
|
|
opacity: 0.65;
|
|
}
|
|
|
|
.slash-menu-desc {
|
|
flex: 1;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
text-align: right;
|
|
font-size: 0.75rem;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.slash-menu-item--active .slash-menu-name {
|
|
color: var(--accent-hover);
|
|
}
|
|
|
|
.slash-menu-item--active .slash-menu-desc {
|
|
color: var(--text);
|
|
}
|
|
|
|
.chat-attachments-preview {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.chat-attachment-thumb {
|
|
position: relative;
|
|
width: 60px;
|
|
height: 60px;
|
|
border-radius: var(--radius-sm);
|
|
overflow: hidden;
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
.chat-attachment-thumb img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
.chat-attachment-remove {
|
|
position: absolute;
|
|
top: 2px;
|
|
right: 2px;
|
|
width: 18px;
|
|
height: 18px;
|
|
border-radius: 50%;
|
|
border: none;
|
|
background: rgba(0, 0, 0, 0.6);
|
|
color: #fff;
|
|
font-size: 12px;
|
|
line-height: 1;
|
|
cursor: pointer;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
}
|
|
|
|
.chat-attachment-file {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
padding: 4px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
font-size: 0.72rem;
|
|
color: var(--muted);
|
|
}
|
|
|
|
.agent-chat__file-input {
|
|
display: none;
|
|
}
|
|
|
|
/* Chat controls - moved to content-header area, left aligned */
|
|
.chat-controls {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
gap: 12px;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.chat-controls__session {
|
|
min-width: 140px;
|
|
max-width: 300px;
|
|
}
|
|
|
|
.chat-controls__thinking {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
/* Icon button style */
|
|
.btn--icon {
|
|
padding: 8px !important;
|
|
min-width: 36px;
|
|
height: 36px;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border: 1px solid var(--border);
|
|
background: rgba(255, 255, 255, 0.06);
|
|
}
|
|
|
|
/* Controls separator */
|
|
.chat-controls__separator {
|
|
color: rgba(255, 255, 255, 0.4);
|
|
font-size: 18px;
|
|
margin: 0 8px;
|
|
font-weight: 300;
|
|
}
|
|
|
|
:root[data-theme-mode="light"] .chat-controls__separator {
|
|
color: rgba(16, 24, 40, 0.3);
|
|
}
|
|
|
|
.btn--icon:hover {
|
|
background: rgba(255, 255, 255, 0.12);
|
|
border-color: rgba(255, 255, 255, 0.2);
|
|
}
|
|
|
|
/* Light theme icon button overrides */
|
|
:root[data-theme-mode="light"] .btn--icon {
|
|
background: #ffffff;
|
|
border-color: var(--border);
|
|
box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
|
|
color: var(--muted);
|
|
}
|
|
|
|
:root[data-theme-mode="light"] .btn--icon:hover {
|
|
background: #ffffff;
|
|
border-color: var(--border-strong);
|
|
color: var(--text);
|
|
}
|
|
|
|
/* Light theme icon button overrides */
|
|
:root[data-theme-mode="light"] .btn--icon {
|
|
background: #ffffff;
|
|
border-color: var(--border);
|
|
box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05);
|
|
color: var(--muted);
|
|
}
|
|
|
|
:root[data-theme-mode="light"] .btn--icon:hover {
|
|
background: #ffffff;
|
|
border-color: var(--border-strong);
|
|
color: var(--text);
|
|
}
|
|
|
|
:root[data-theme-mode="light"] .chat-controls .btn--icon.active {
|
|
border-color: var(--accent);
|
|
background: var(--accent-subtle);
|
|
color: var(--accent);
|
|
box-shadow: 0 0 0 1px var(--accent-subtle);
|
|
}
|
|
|
|
.btn--icon svg {
|
|
display: block;
|
|
width: 18px;
|
|
height: 18px;
|
|
stroke: currentColor;
|
|
fill: none;
|
|
stroke-width: 1.5px;
|
|
stroke-linecap: round;
|
|
stroke-linejoin: round;
|
|
}
|
|
|
|
.chat-controls__session select {
|
|
padding: 6px 10px;
|
|
font-size: 13px;
|
|
max-width: 300px;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.chat-controls__thinking {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
font-size: 12px;
|
|
padding: 4px 10px;
|
|
background: rgba(255, 255, 255, 0.04);
|
|
border-radius: 6px;
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
/* Light theme thinking indicator override */
|
|
:root[data-theme-mode="light"] .chat-controls__thinking {
|
|
background: rgba(255, 255, 255, 0.9);
|
|
border-color: rgba(16, 24, 40, 0.15);
|
|
}
|
|
|
|
@media (max-width: 640px) {
|
|
.chat-session {
|
|
min-width: 140px;
|
|
}
|
|
|
|
.chat-compose {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
/* Mobile: stack compose row vertically */
|
|
.chat-compose__row {
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
}
|
|
|
|
/* Mobile: stack action buttons vertically */
|
|
.chat-compose__actions {
|
|
flex-direction: column;
|
|
width: 100%;
|
|
gap: 8px;
|
|
}
|
|
|
|
/* Mobile: full-width buttons */
|
|
.chat-compose .chat-compose__actions .btn {
|
|
width: 100%;
|
|
}
|
|
|
|
.chat-controls {
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
}
|
|
|
|
.chat-controls__session {
|
|
min-width: 120px;
|
|
}
|
|
}
|
|
|
|
/* Chat loading skeleton */
|
|
.chat-loading-skeleton {
|
|
padding: 4px 0;
|
|
animation: fade-in 0.3s var(--ease-out);
|
|
}
|
|
|
|
/* Welcome state (new session) */
|
|
.agent-chat__welcome {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
text-align: center;
|
|
gap: 12px;
|
|
padding: 48px 24px;
|
|
flex: 1;
|
|
min-height: 0;
|
|
}
|
|
|
|
.agent-chat__welcome-glow {
|
|
display: none;
|
|
}
|
|
|
|
.agent-chat__welcome h2 {
|
|
font-size: 20px;
|
|
font-weight: 600;
|
|
margin: 0;
|
|
color: var(--foreground);
|
|
}
|
|
|
|
.agent-chat__avatar--logo {
|
|
width: 48px;
|
|
height: 48px;
|
|
border-radius: 14px;
|
|
background: var(--panel-strong);
|
|
border: 1px solid var(--border);
|
|
display: grid;
|
|
place-items: center;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.agent-chat__avatar--logo img {
|
|
width: 32px;
|
|
height: 32px;
|
|
object-fit: contain;
|
|
}
|
|
|
|
.agent-chat__badges {
|
|
display: flex;
|
|
gap: 8px;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
}
|
|
|
|
.agent-chat__badge {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
font-size: 12px;
|
|
font-weight: 500;
|
|
color: var(--muted);
|
|
background: var(--panel);
|
|
border: 1px solid var(--border);
|
|
border-radius: 100px;
|
|
padding: 4px 12px;
|
|
}
|
|
|
|
.agent-chat__badge img {
|
|
width: 14px;
|
|
height: 14px;
|
|
object-fit: contain;
|
|
}
|
|
|
|
.agent-chat__hint {
|
|
font-size: 13px;
|
|
color: var(--muted);
|
|
margin: 0;
|
|
}
|
|
|
|
.agent-chat__hint kbd {
|
|
display: inline-block;
|
|
padding: 1px 6px;
|
|
font-size: 11px;
|
|
font-family: var(--font-mono);
|
|
background: var(--panel-strong);
|
|
border: 1px solid var(--border);
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.agent-chat__suggestions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
justify-content: center;
|
|
max-width: 480px;
|
|
margin-top: 8px;
|
|
}
|
|
|
|
.agent-chat__suggestion {
|
|
font-size: 13px;
|
|
padding: 8px 16px;
|
|
border-radius: 100px;
|
|
border: 1px solid var(--border);
|
|
background: var(--panel);
|
|
color: var(--foreground);
|
|
cursor: pointer;
|
|
transition: background 0.15s, border-color 0.15s;
|
|
}
|
|
|
|
.agent-chat__suggestion:hover {
|
|
background: var(--panel-strong);
|
|
border-color: var(--accent);
|
|
}
|