/* ── Messages container ────────────────────────────────────────────────────── */ .copilot-messages { flex: 1; overflow-y: auto; padding: 1.25rem; display: flex; flex-direction: column; gap: 0.7rem; } /* ── Message bubbles ───────────────────────────────────────────────────────── */ .copilot-msg { padding: 0.65rem 1rem; border-radius: 1rem; font-size: 0.95rem; line-height: 1.6; max-width: 88%; } .copilot-msg.assistant { background: var(--msg-assistant-bg); color: var(--msg-assistant-text); align-self: flex-start; border-bottom-left-radius: 0.2rem; } .copilot-msg.user { background: var(--msg-user-bg); color: var(--msg-user-text); align-self: flex-end; border-bottom-right-radius: 0.2rem; } .copilot-msg.error { background: #fef2f2; color: #991b1b; align-self: flex-start; border-bottom-left-radius: 0.2rem; font-size: 0.82rem; } @media (prefers-color-scheme: dark) { .copilot-msg.error { background: #2d1515; color: #fca5a5; } } .copilot-msg.info { background: #f0f9ff; color: #0369a1; align-self: flex-start; border-bottom-left-radius: 0.2rem; font-size: 0.80rem; } @media (prefers-color-scheme: dark) { .copilot-msg.info { background: #0c1e2d; color: #7dd3fc; } } .copilot-msg--failed { opacity: 0.6; } .copilot-failed-badge { color: #dc2626; font-size: 0.75rem; margin-right: 0.35rem; flex-shrink: 0; } .copilot-thinking { opacity: 0.65; } .copilot-token-count { margin-top: 0.3rem; font-size: 0.7rem; color: var(--placeholder-color); opacity: 0.6; font-style: normal; font-family: var(--font-mono); letter-spacing: 0.02em; } /* ── Reasoning (chain-of-thought) block ────────────────────────────────────── */ /* Small, low-contrast, collapsed by default: visible but never heavy. */ .reasoning-block { margin: 0 0 0.45rem; font-size: 0.75rem; color: var(--placeholder-color); opacity: 0.75; } .reasoning-block > summary { cursor: pointer; user-select: none; font-style: italic; letter-spacing: 0.02em; list-style-position: inside; padding: 0.1rem 0; } .reasoning-block > summary:hover { color: var(--msg-assistant-text); } .reasoning-block--live > summary { animation: reasoning-pulse 1.6s ease-in-out infinite; } .reasoning-content { margin-top: 0.35rem; padding-left: 0.6rem; border-left: 2px solid var(--toolbar-border); white-space: pre-wrap; word-break: break-word; font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.5; max-height: 16rem; overflow-y: auto; } @keyframes reasoning-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } } @media (prefers-reduced-motion: reduce) { .reasoning-block--live > summary { animation: none; } } /* Blinking caret at the end of a streaming assistant bubble. */ .stream-caret { display: inline-block; width: 0.5em; height: 1em; margin-left: 0.1em; vertical-align: text-bottom; background: currentColor; opacity: 0.6; animation: stream-caret-blink 1s steps(2, start) infinite; } @keyframes stream-caret-blink { to { visibility: hidden; } } @media (prefers-reduced-motion: reduce) { .stream-caret { animation: none; } } /* ── Tool call blocks ──────────────────────────────────────────────────────── */ .copilot-tool { font-size: 0.78rem; } /* Pending approval needs to stand out */ .copilot-tool--pending { border: 1px solid var(--toolbar-border); border-radius: 0.4rem; border-left: 3px solid #f59e0b; } .copilot-tool-header { display: flex; align-items: center; gap: 0.35rem; width: 100%; padding: 0.15rem 0.25rem; background: transparent; border: none; cursor: pointer; text-align: left; font-size: 0.78rem; color: var(--placeholder-color); transition: color 0.12s; } .copilot-tool--pending .copilot-tool-header { padding: 0.4rem 0.6rem; } .copilot-tool-header:hover { color: inherit; } .copilot-tool-status { display: flex; align-items: center; flex-shrink: 0; font-size: 0.7rem; } /* The leading tool-type icon: a colored glyph, or an MCP connector's own icon. */ .copilot-tool-ico { flex-shrink: 0; font-size: 0.9rem; line-height: 1; color: var(--tool-generic); } .copilot-tool-ico-wrap { display: inline-flex; align-items: center; flex-shrink: 0; } .copilot-tool-ico-img { width: 15px; height: 15px; object-fit: contain; border-radius: 3px; } /* Fallback: hide the glyph unless the connector image failed to load. */ .copilot-tool-ico-wrap .copilot-tool-ico { display: none; } .copilot-tool-ico-wrap.img-failed .copilot-tool-ico-img { display: none; } .copilot-tool-ico-wrap.img-failed .copilot-tool-ico { display: inline; } .tool-ico--edit { color: var(--tool-edit); } .tool-ico--read { color: var(--tool-read); } .tool-ico--list { color: var(--tool-list); } .tool-ico--search { color: var(--tool-search); } .tool-ico--shell { color: var(--tool-shell); } .tool-ico--subagent { color: var(--tool-subagent); } .tool-ico--image { color: var(--tool-image); } .tool-ico--config { color: var(--tool-config); } .tool-ico--introspection { color: var(--tool-introspection); } .tool-ico--mcp { color: var(--tool-mcp); } .tool-ico--file, .tool-ico--tool { color: var(--tool-generic); } .copilot-tool-name { display: flex; align-items: baseline; gap: 0.4rem; min-width: 0; overflow: hidden; } /* The friendly, static tool title ("Edit File") — the primary label. */ .copilot-tool-title { font-weight: 500; white-space: nowrap; flex-shrink: 0; color: var(--msg-assistant-text); } /* The muted secondary detail (target path / command / primary arg). */ .copilot-tool-detail { font-family: var(--bs-font-monospace); font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; color: var(--placeholder-color); } .copilot-tool-name code { font-family: inherit; font-size: inherit; background: rgba(0,0,0,0.06); border-radius: 0.2rem; padding: 0 0.25em; } @media (prefers-color-scheme: dark) { .copilot-tool-name code { background: rgba(255,255,255,0.08); } } /* A file path that opens the file viewer. Reads as a code chip but acts as a link. */ .copilot-tool-name .copilot-tool-path, .copilot-tool-path { font-family: var(--bs-font-monospace); font-size: inherit; color: var(--accent); cursor: pointer; border-radius: 0.2rem; padding: 0 0.25em; background: rgba(var(--accent-rgb), 0.10); text-decoration: none; } .copilot-tool-path:hover { text-decoration: underline; background: rgba(var(--accent-rgb), 0.18); } .copilot-tool-body { border-top: 1px solid var(--toolbar-border); display: flex; flex-direction: column; gap: 0; } .copilot-tool-section { display: flex; flex-direction: column; padding: 0.4rem 0.6rem; } .copilot-tool-section + .copilot-tool-section { border-top: 1px solid var(--toolbar-border); } .copilot-tool-label { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 0.25rem; color: var(--placeholder-color); } .copilot-tool-label--done { color: #16a34a; } .copilot-tool-label--error { color: #dc2626; } .copilot-tool-pre { font-size: 0.72rem; font-family: var(--bs-font-monospace); white-space: pre-wrap; word-break: break-all; margin: 0; padding: 0.35rem 0.5rem; background: rgba(0, 0, 0, 0.04); border-radius: 0.25rem; max-height: 200px; overflow-y: auto; } @media (prefers-color-scheme: dark) { .copilot-tool-pre { background: rgba(255, 255, 255, 0.04); } } .copilot-tool-pre--error { color: #dc2626; } /* Structured (`result_type === 'json'`) results: keep JSON readable (don't break mid-token) and flag the typed payload with a left accent. */ .copilot-tool-pre--json { word-break: normal; overflow-x: auto; border-left: 2px solid var(--bs-info, #0dcaf0); } /* ── Markdown rendering ────────────────────────────────────────────────────── */ .copilot-markdown { max-width: 100%; } .copilot-markdown > *:first-child { margin-top: 0; } .copilot-markdown > *:last-child { margin-bottom: 0; } .copilot-markdown h1, .copilot-markdown h2, .copilot-markdown h3, .copilot-markdown h4 { font-size: 0.9rem; font-weight: 700; margin: 0.75rem 0 0.3rem; line-height: 1.3; } .copilot-markdown p { margin: 0.4rem 0; } .copilot-markdown ul, .copilot-markdown ol { margin: 0.4rem 0; padding-left: 1.4rem; } .copilot-markdown li { margin: 0.15rem 0; } .copilot-markdown code { font-family: var(--bs-font-monospace); font-size: 0.78rem; background: rgba(0, 0, 0, 0.08); padding: 0.1em 0.35em; border-radius: 0.25rem; } @media (prefers-color-scheme: dark) { .copilot-markdown code { background: rgba(255, 255, 255, 0.1); } } .copilot-markdown pre { background: rgba(0, 0, 0, 0.06); border-radius: 0.4rem; padding: 0.65rem 0.85rem; overflow-x: auto; margin: 0.5rem 0; font-size: 0.78rem; } @media (prefers-color-scheme: dark) { .copilot-markdown pre { background: rgba(255, 255, 255, 0.06); } } .copilot-markdown pre code { background: none; padding: 0; font-size: inherit; } .copilot-markdown blockquote { border-left: 3px solid var(--accent); margin: 0.5rem 0; padding: 0.3rem 0.75rem; color: var(--placeholder-color); font-style: italic; } .copilot-markdown hr { border: none; border-top: 1px solid var(--toolbar-border); margin: 0.6rem 0; } .copilot-markdown a { color: var(--accent); text-decoration: underline; } .copilot-markdown strong { font-weight: 700; } .copilot-markdown em { font-style: italic; } /* Keep wide content inside the bubble so it never stretches the message list (which would let the whole page pan sideways). Images shrink to the bubble width; tables become their own horizontal scroll box. Code blocks (`pre`) already scroll within themselves (overflow-x: auto above). */ .copilot-markdown img { max-width: 100%; height: auto; border-radius: 0.4rem; } .copilot-markdown table { display: block; max-width: 100%; overflow-x: auto; border-collapse: collapse; } /* ── Approval panel ────────────────────────────────────────────────────────── */ .copilot-approval { border: 1px solid var(--toolbar-border); border-radius: 0.5rem; font-size: 0.82rem; } .copilot-approval--approved { border-color: #16a34a; } .copilot-approval--rejected { border-color: #dc2626; } .copilot-approval-header { display: flex; align-items: center; gap: 0.5rem; padding: 0.45rem 0.75rem; background: var(--msg-assistant-bg); font-size: 0.8rem; flex-wrap: wrap; } .copilot-approval-path { font-family: var(--bs-font-monospace); font-size: 0.75rem; color: var(--accent); } .copilot-approval-actions { display: flex; flex-direction: column; gap: 0.4rem; padding: 0.5rem 0.75rem; border-top: 1px solid var(--toolbar-border); } .copilot-approval-btns { display: flex; gap: 0.4rem; } .copilot-reject-note { font-size: 0.8rem; resize: none; } .copilot-clarification-title { font-weight: 600; font-size: 0.82rem; color: var(--text-primary, #1e293b); } .copilot-clarification-question { font-size: 0.82rem; color: var(--text-secondary, #475569); } .copilot-clarification-chips { display: flex; flex-wrap: wrap; gap: 0.3rem; } .copilot-chip { font-size: 0.75rem; padding: 0.15rem 0.5rem; border-radius: 999px; } .copilot-clarification-input-row { display: flex; align-items: flex-start; gap: 0.4rem; } /* ── Diff view ─────────────────────────────────────────────────────────────── */ .copilot-diff { font-family: var(--bs-font-monospace); font-size: 0.72rem; line-height: 1.5; white-space: pre; overflow-x: auto; max-height: 320px; overflow-y: auto; margin: 0; padding: 0.5rem 0; background: transparent; border-top: 1px solid var(--toolbar-border); } .diff-added { display: block; background: rgba(22, 163, 74, 0.12); color: #15803d; padding: 0 0.75rem; } .diff-removed { display: block; background: rgba(220, 38, 38, 0.1); color: #b91c1c; padding: 0 0.75rem; text-decoration: line-through; opacity: 0.85; } .diff-unchanged { display: block; padding: 0 0.75rem; color: var(--placeholder-color); } .diff-ellipsis { display: block; padding: 0.1rem 0.75rem; color: var(--placeholder-color); font-style: italic; background: rgba(0, 0, 0, 0.03); text-align: center; } @media (prefers-color-scheme: dark) { .diff-added { color: #4ade80; } .diff-removed { color: #f87171; } .diff-ellipsis { background: rgba(255, 255, 255, 0.03); } } /* ── Agent trace ───────────────────────────────────────────────────────────── */ .copilot-agent, .copilot-agent-end { border: 1px solid rgba(var(--accent-rgb), 0.2); border-radius: 0.5rem; font-size: 0.78rem; overflow: clip; margin-left: calc(var(--agent-depth, 0) * 1rem); } .copilot-agent-header { display: flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.65rem; background: rgba(var(--accent-rgb), 0.12); color: var(--msg-assistant-text); } .copilot-agent-header i { font-size: 0.85rem; flex-shrink: 0; color: var(--accent); } .copilot-agent-header strong { color: var(--accent); font-weight: 600; } .copilot-agent-badge { margin-left: auto; font-size: 0.67rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; padding: 0.1rem 0.4rem; border-radius: 0.25rem; } .copilot-agent-badge.running { background: rgba(234, 179, 8, 0.15); color: #b45309; } .copilot-agent-badge.done { background: rgba(22, 163, 74, 0.12); color: #15803d; } .copilot-agent-preview { font-size: 0.75rem; font-family: var(--bs-font-monospace); white-space: pre-wrap; word-break: break-word; margin: 0; padding: 0.45rem 0.65rem; color: var(--placeholder-color); border-top: 1px solid rgba(var(--accent-rgb), 0.15); max-height: 120px; overflow-y: auto; background: rgba(var(--accent-rgb), 0.05); } .copilot-agent-preview--result { color: var(--msg-assistant-text); opacity: 0.8; } @media (prefers-color-scheme: dark) { .copilot-agent-badge.running { background: rgba(234, 179, 8, 0.2); color: #fbbf24; } .copilot-agent-badge.done { background: rgba(22, 163, 74, 0.18); color: #4ade80; } .copilot-agent-header { background: rgba(var(--accent-rgb), 0.1); } } /* ── Attachment chips (composer pending + sent user bubble) ──────────────────── */ .attach-chips { display: flex; flex-wrap: wrap; gap: 0.35rem; padding: 0.4rem 0.5rem; } /* Inside a user bubble the chips sit below the text with a little top spacing. */ .copilot-msg.user .attach-chips { padding: 0.4rem 0 0; } .attach-chip { display: inline-flex; align-items: center; gap: 0.35rem; max-width: 100%; padding: 0.2rem 0.45rem; border: 1px solid var(--toolbar-border); border-radius: 0.5rem; background: var(--msg-assistant-bg); font-size: 0.75rem; line-height: 1.2; } .attach-chip--clickable { cursor: pointer; } .attach-chip--clickable:hover { border-color: var(--accent); } .attach-chip--uploading { opacity: 0.7; } .attach-chip .bi { font-size: 0.85rem; flex-shrink: 0; } .attach-chip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 12rem; } .attach-chip-size { color: var(--placeholder-color); flex-shrink: 0; } .attach-chip-remove { display: inline-flex; align-items: center; justify-content: center; width: 1.1rem; height: 1.1rem; padding: 0; border: none; border-radius: 0.3rem; background: transparent; color: var(--placeholder-color); cursor: pointer; flex-shrink: 0; } .attach-chip-remove:hover { background: var(--sidebar-hover); color: #dc2626; } /* ── Tool card "view details" (eye) ────────────────────────────────────────── */ .copilot-tool-eye { display: inline-flex; align-items: center; padding: 0 0.25rem; color: var(--placeholder-color); border-radius: 0.25rem; flex-shrink: 0; } .copilot-tool-eye:hover { color: var(--accent); background: var(--accent-soft); } /* ── Tool-detail page (#tool_detail) ───────────────────────────────────────── */ .tool-detail-page { display: flex; flex-direction: column; height: 100%; width: 100%; } .tool-detail-body { flex: 1; overflow-y: auto; padding: 1rem 1.25rem; display: flex; flex-direction: column; gap: 1rem; } .tool-detail-section { display: flex; flex-direction: column; gap: 0.35rem; } .tool-detail-label { font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--placeholder-color); } .tool-detail-pre { font-family: var(--bs-font-monospace); font-size: 0.82rem; white-space: pre-wrap; word-break: break-word; margin: 0; padding: 0.7rem 0.9rem; background: rgba(0, 0, 0, 0.04); border: 1px solid var(--toolbar-border); border-radius: var(--radius-sm); overflow-x: auto; } .tool-detail-pre--error { color: #dc2626; } @media (prefers-color-scheme: dark) { .tool-detail-pre { background: rgba(255, 255, 255, 0.04); } } .tool-detail-muted { color: var(--placeholder-color); font-size: 0.85rem; } .tool-detail-path { align-self: flex-start; font-family: var(--bs-font-monospace); font-size: 0.82rem; color: var(--accent); background: var(--accent-soft); border: none; border-radius: var(--radius-sm); padding: 0.3rem 0.6rem; cursor: pointer; } .tool-detail-path:hover { text-decoration: underline; } /* The detail page's diff fills the panel rather than the compact card height. */ .tool-detail-page .copilot-diff { max-height: none; font-size: 0.82rem; }