feat(web): add Agent Studio workspace UI

This commit is contained in:
Wenxin Duan
2026-09-07 17:17:04 +08:00
parent 63ea92b770
commit 145033974e
18 changed files with 647 additions and 2 deletions
+78
View File
@@ -0,0 +1,78 @@
.topbar { display: grid; grid-template-columns: minmax(190px, 1fr) auto minmax(190px, 1fr); align-items: center; gap: 16px; padding: 0 20px; border-bottom: 1px solid var(--border); background: #141515; }
.brand-lockup, .topbar__status, .topbar__actions, .panel-heading, .skill-item__title, .event-row__head, .composer__actions, .state-view { display: flex; align-items: center; }
.brand-lockup { gap: 10px; }
.brand-lockup > div { display: grid; gap: 1px; }
.brand-lockup span { color: var(--muted); font-size: 9px; letter-spacing: .16em; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #397c79; border-radius: 10px; color: var(--accent) !important; background: #132321; }
.topbar__status { gap: 8px; color: var(--muted); font-size: 12px; }
.connection-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); }
.connection-dot--open { background: var(--accent); box-shadow: 0 0 0 3px rgb(37 244 238 / 10%); }
.connection-dot--error { background: var(--danger); }
.connection-dot--connecting, .connection-dot--reconnecting { background: var(--warning); }
.topbar__divider { width: 1px; height: 14px; background: var(--border-strong); }
.session-code { font-family: "SFMono-Regular", Consolas, monospace; }
.topbar__actions { justify-content: flex-end; gap: 8px; }
.status-chip, .count-badge { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 999px; color: #c8d1cf; background: var(--surface-raised); }
.status-chip { height: 30px; padding: 0 10px; font-size: 11px; }
.count-badge { min-width: 26px; height: 24px; justify-content: center; font-size: 11px; }
.icon-button { width: 44px; height: 44px; display: inline-grid; place-items: center; border: 0; border-radius: var(--radius-sm); color: var(--muted); background: transparent; }
.icon-button:hover { color: var(--text); background: var(--surface-raised); }
.panel-heading { justify-content: space-between; min-height: 78px; padding: 16px 18px 12px; border-bottom: 1px solid var(--border); }
.panel-heading h2 { margin: 3px 0 0; font-size: 16px; }
.eyebrow { color: var(--accent); font-size: 9px; font-weight: 700; letter-spacing: .15em; }
.panel-intro { margin: 0; padding: 14px 18px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 12px; line-height: 1.6; }
.skill-list { overflow: auto; list-style: none; margin: 0; padding: 6px 0 24px; }
.skill-item { padding: 16px 18px; border-bottom: 1px solid var(--border); }
.skill-item__title { justify-content: space-between; gap: 8px; }
.skill-item__title svg { color: var(--accent); }
.skill-item p { margin: 7px 0 10px; color: #c4ccca; font-size: 12px; line-height: 1.5; }
.skill-meta { display: grid; gap: 5px; color: var(--muted); font-size: 10px; }
.skill-meta code { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.diagnostic { display: flex; gap: 6px; margin-top: 9px; color: var(--warning); font-size: 11px; }
.panel-empty { margin: auto; display: grid; place-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.thread-root { height: 100%; min-height: 0; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
.thread-viewport { position: relative; overflow-y: auto; padding: 28px clamp(20px, 5vw, 72px); }
.thread-states { position: sticky; z-index: 2; top: 0; max-width: 760px; margin: 0 auto 16px; display: grid; gap: 8px; }
.thread-empty { min-height: 100%; max-width: 580px; margin: auto; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.thread-empty__icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 24px; border: 1px solid #367875; border-radius: 14px; color: var(--accent); background: #142523; }
.thread-empty h1 { max-width: 520px; margin: 9px 0 12px; font-size: clamp(25px, 4vw, 38px); line-height: 1.1; letter-spacing: -.03em; }
.thread-empty p { max-width: 500px; color: var(--muted); line-height: 1.7; }
.secondary-button { min-height: 44px; margin-top: 8px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); color: var(--text); background: var(--surface-raised); }
.secondary-button:hover { border-color: #4d7472; }
.message { max-width: 760px; margin: 0 auto 28px; display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.message--user .message__body { width: fit-content; max-width: 88%; padding: 12px 15px; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-raised); }
.message__avatar { width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 9px; color: var(--muted); }
.message--assistant .message__avatar { color: var(--accent); border-color: #315b59; }
.message__label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.message__body p { margin-bottom: 10px; line-height: 1.7; }
.scroll-button { position: sticky; bottom: 8px; left: 50%; width: 38px; height: 38px; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface-raised); color: var(--text); box-shadow: var(--shadow); }
.composer-area { padding: 0 clamp(16px, 4vw, 56px) 16px; }
.composer { max-width: 820px; margin: 0 auto; border: 1px solid var(--border-strong); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.composer:focus-within { border-color: #4c7775; }
.composer__input { width: 100%; min-height: 76px; max-height: 190px; resize: none; padding: 16px 18px 8px; border: 0; outline: 0; color: var(--text); background: transparent; line-height: 1.5; }
.composer__input::placeholder { color: #65716f; }
.composer__actions { min-height: 48px; justify-content: space-between; padding: 4px 7px 7px; }
.send-button { min-width: 88px; min-height: 40px; padding: 0 14px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 10px; color: var(--accent-ink); background: var(--accent); font-weight: 750; }
.send-button--stop { color: white; background: var(--danger); }
.composer-hint, .composer-footnote { max-width: 820px; margin: 0 auto; color: var(--muted); font-size: 11px; }
.composer-hint { padding: 0 3px 8px; color: var(--warning); }
.composer-footnote { padding-top: 8px; text-align: center; }
.filter-label { display: grid; gap: 7px; padding: 12px 16px; border-bottom: 1px solid var(--border); color: var(--muted); font-size: 10px; text-transform: uppercase; letter-spacing: .08em; }
.filter-label select { height: 36px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-raised); }
.timeline { overflow-y: auto; padding: 6px 0 24px; }
.event-row { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 9px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.event-row > svg { margin-top: 3px; color: #4e7573; }
.event-row__head { gap: 8px; min-width: 0; }
.event-row__head code { color: var(--muted); font-size: 10px; }
.event-row__head strong { overflow: hidden; text-overflow: ellipsis; font-size: 11px; white-space: nowrap; }
.event-row time { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; }
.timeline-note { padding: 0 16px; color: var(--muted); font-size: 10px; }
.state-view { gap: 10px; padding: 12px 14px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--surface-raised); }
.state-view svg { color: var(--accent); }
.state-view--error svg { color: var(--danger); }
.state-view strong { display: block; }
.state-view p { margin: 3px 0 0; color: var(--muted); font-size: 12px; }
.spin { animation: spin 1.2s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } }
@media (max-width: 720px) { .topbar { grid-template-columns: 1fr auto; padding: 0 12px; } .topbar__actions { grid-column: 2; } .thread-viewport { padding: 20px 16px; } .composer-area { padding: 0 10px 10px; } }