diff --git a/ui/src/styles/chat/agent-chat.css b/ui/src/styles/chat/agent-chat.css index 13d4023a54b..0b70ef31a07 100644 --- a/ui/src/styles/chat/agent-chat.css +++ b/ui/src/styles/chat/agent-chat.css @@ -1124,28 +1124,28 @@ display: flex; align-items: center; justify-content: space-between; - padding: 6px 16px; + padding: 4px 12px; border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent); flex-shrink: 0; - gap: 8px; + gap: 6px; } .chat-agent-bar__left { display: flex; align-items: center; - gap: 10px; + gap: 8px; min-width: 0; } .chat-agent-bar__right { display: flex; align-items: center; - gap: 4px; + gap: 2px; flex-shrink: 0; } .chat-agent-bar__name { - font-size: 13px; + font-size: 12px; font-weight: 600; color: var(--text); } @@ -1155,14 +1155,14 @@ border: 1px solid var(--border); border-radius: var(--radius-md); color: var(--text); - font-size: 13px; + font-size: 12px; font-weight: 500; - padding: 4px 24px 4px 8px; + padding: 2px 20px 2px 6px; cursor: pointer; appearance: none; - background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237d8590' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); + background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 24 24' fill='none' stroke='%237d8590' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; - background-position: right 6px center; + background-position: right 4px center; transition: border-color 150ms ease, background 150ms ease; @@ -1188,10 +1188,10 @@ .chat-sessions-summary { display: inline-flex; align-items: center; - gap: 5px; - padding: 3px 8px; - border-radius: var(--radius-md); - font-size: 12px; + gap: 4px; + padding: 2px 6px; + border-radius: var(--radius-sm); + font-size: 11px; font-weight: 500; color: var(--muted); cursor: pointer; @@ -1222,8 +1222,8 @@ } .chat-sessions-summary svg { - width: 13px; - height: 13px; + width: 12px; + height: 12px; } .chat-sessions-list { @@ -1250,13 +1250,13 @@ display: flex; align-items: center; justify-content: space-between; - gap: 8px; - padding: 6px 10px; + gap: 6px; + padding: 4px 8px; border: none; border-radius: var(--radius-sm); background: none; color: var(--text); - font-size: 12px; + font-size: 11px; cursor: pointer; text-align: left; width: 100%; diff --git a/ui/src/styles/chat/layout.css b/ui/src/styles/chat/layout.css index fa63922897d..a94a9ce2f70 100644 --- a/ui/src/styles/chat/layout.css +++ b/ui/src/styles/chat/layout.css @@ -52,7 +52,7 @@ flex: 1 1 0; /* Grow, shrink, and use 0 base for proper scrolling */ overflow-y: auto; overflow-x: hidden; - padding: 14px 8px; + padding: 10px 6px; margin: 0 -4px; min-height: 0; /* Allow shrinking for flex scroll behavior */ border-radius: var(--radius-lg); @@ -318,13 +318,13 @@ display: flex; align-items: center; justify-content: flex-start; - gap: 12px; + gap: 6px; flex-wrap: wrap; } .chat-controls__session { - min-width: 140px; - max-width: 300px; + min-width: 120px; + max-width: 260px; } .chat-controls__thinking { @@ -336,9 +336,9 @@ /* Icon button style */ .btn--icon { - padding: 8px !important; - min-width: 36px; - height: 36px; + padding: 6px !important; + min-width: 32px; + height: 32px; display: inline-flex; align-items: center; justify-content: center; @@ -350,8 +350,8 @@ /* Controls separator */ .chat-controls__separator { color: var(--border); - font-size: 18px; - margin: 0 8px; + font-size: 14px; + margin: 0 2px; font-weight: 300; } @@ -369,8 +369,8 @@ .btn--icon svg { display: block; - width: 18px; - height: 18px; + width: 16px; + height: 16px; stroke: currentColor; fill: none; stroke-width: 1.5px; @@ -379,9 +379,9 @@ } .chat-controls__session select { - padding: 6px 10px; - font-size: 13px; - max-width: 300px; + padding: 4px 8px; + font-size: 12px; + max-width: 260px; overflow: hidden; text-overflow: ellipsis; } @@ -390,8 +390,8 @@ display: flex; align-items: center; gap: 4px; - font-size: 12px; - padding: 4px 10px; + font-size: 11px; + padding: 2px 8px; background: color-mix(in srgb, var(--secondary) 90%, transparent); border-radius: var(--radius-sm); border: 1px solid color-mix(in srgb, var(--border) 88%, transparent); @@ -399,7 +399,7 @@ @media (max-width: 640px) { .chat-session { - min-width: 140px; + min-width: 100px; } .chat-compose { @@ -408,10 +408,11 @@ .chat-controls { flex-wrap: wrap; - gap: 8px; + gap: 4px; } .chat-controls__session { - min-width: 120px; + min-width: 100px; + max-width: 180px; } } diff --git a/ui/src/styles/components.css b/ui/src/styles/components.css index a9a5f3ffaef..8c323526bb1 100644 --- a/ui/src/styles/components.css +++ b/ui/src/styles/components.css @@ -2840,16 +2840,16 @@ } .ov-log-tail-content { - margin-top: 12px; - max-height: 250px; + margin-top: 10px; + max-height: 220px; overflow: auto; font-family: var(--mono); font-size: 11px; - line-height: 1.6; + line-height: 1.5; white-space: pre-wrap; - word-break: break-all; + word-break: break-word; background: var(--bg-inset, var(--bg)); - padding: 12px; + padding: 10px; border-radius: var(--radius); border: 1px solid var(--border); } diff --git a/ui/src/styles/layout.css b/ui/src/styles/layout.css index 3422620ee86..340e3385037 100644 --- a/ui/src/styles/layout.css +++ b/ui/src/styles/layout.css @@ -722,7 +722,7 @@ .content--chat { display: flex; flex-direction: column; - gap: 24px; + gap: 16px; overflow: hidden; padding-bottom: 0; } diff --git a/ui/src/styles/layout.mobile.css b/ui/src/styles/layout.mobile.css index 084373ab82f..19c5c6474fd 100644 --- a/ui/src/styles/layout.mobile.css +++ b/ui/src/styles/layout.mobile.css @@ -140,8 +140,21 @@ flex-shrink: 0; } - /* Content */ + /* Content — compact header on chat, hide on other tabs */ .content-header { + padding: 0; + max-height: 48px; + } + + .content:not(.content--chat) .content-header { + display: none; + } + + .content--chat .page-title { + font-size: 18px; + } + + .content--chat .page-sub { display: none; } @@ -212,10 +225,29 @@ } /* Chat */ + .chat-agent-bar { + padding: 4px 8px; + gap: 4px; + } + + .chat-agent-bar__name { + font-size: 11px; + } + + .chat-agent-select { + font-size: 11px; + padding: 2px 16px 2px 4px; + } + + .chat-sessions-summary { + padding: 2px 4px; + font-size: 10px; + } + .chat-header { flex-direction: column; align-items: stretch; - gap: 8px; + gap: 6px; } .chat-header__left { @@ -233,40 +265,60 @@ } .chat-thread { - margin-top: 8px; - padding: 12px 8px; + margin-top: 6px; + padding: 10px 6px; } .chat-msg { - max-width: 90%; + max-width: 92%; } .chat-bubble { - padding: 8px 12px; + padding: 6px 10px; border-radius: var(--radius-md); } .chat-compose { - gap: 8px; + gap: 6px; } .chat-compose__field textarea { - min-height: 60px; - padding: 8px 10px; + min-height: 52px; + padding: 6px 10px; border-radius: var(--radius-md); font-size: 14px; } + .agent-chat__input { + margin: 0 8px 10px; + } + + .agent-chat__toolbar { + padding: 4px 8px; + } + + .agent-chat__input-btn, + .agent-chat__toolbar .btn-ghost { + width: 28px; + height: 28px; + } + + .agent-chat__input-btn svg, + .agent-chat__toolbar .btn-ghost svg { + width: 14px; + height: 14px; + } + /* Log stream */ .log-stream { border-radius: var(--radius-md); - max-height: 380px; + max-height: 320px; } .log-row { grid-template-columns: 1fr; - gap: 4px; - padding: 8px; + gap: 2px; + padding: 6px; } .log-time { @@ -282,7 +334,15 @@ } .log-message { - font-size: 12px; + font-size: 11px; + word-break: break-word; + } + + .ov-log-tail-content { + max-height: 200px; + font-size: 10px; + padding: 8px; + line-height: 1.5; } /* Lists */ diff --git a/ui/src/ui/views/overview-log-tail.ts b/ui/src/ui/views/overview-log-tail.ts index 72c3c981c2f..7252f59052f 100644 --- a/ui/src/ui/views/overview-log-tail.ts +++ b/ui/src/ui/views/overview-log-tail.ts @@ -2,6 +2,12 @@ import { html, nothing } from "lit"; import { t } from "../../i18n/index.ts"; import { icons } from "../icons.ts"; +/** Strip ANSI escape codes (SGR, OSC-8) for readable log display. */ +function stripAnsi(text: string): string { + /* eslint-disable no-control-regex -- stripping ANSI escape sequences requires matching ESC */ + return text.replace(/\x1b\]8;;.*?\x1b\\|\x1b\]8;;\x1b\\/g, "").replace(/\x1b\[[0-9;]*m/g, ""); +} + export type OverviewLogTailProps = { lines: string[]; redacted: boolean; @@ -13,6 +19,13 @@ export function renderOverviewLogTail(props: OverviewLogTailProps) { return nothing; } + const displayLines = props.redacted + ? "[log hidden]" + : props.lines + .slice(-50) + .map((line) => stripAnsi(line)) + .join("\n"); + return html`
@@ -28,9 +41,7 @@ export function renderOverviewLogTail(props: OverviewLogTailProps) { }} >${icons.loader} -
${
-        props.redacted ? "[log hidden]" : props.lines.slice(-50).join("\n")
-      }
+
${displayLines}
`; }