agent-console 1.3.5: Windows reconnect through wails.localhost (Windows, http, no port only), model picker refresh keyed on a per-provider fingerprint of magpie's and the agent's own files, Magpie per-agent model filter, explicit picks forced past the snapshot, gateway URL anchored after the port.
Reviewed at 44661c8 on mote (fresh HOME, npm ci --ignore-scripts, Node 22): npm run check ok; vitest 535 passed, 17 skipped, 1 known flake also on main 749e9dd1 (claude-cli mid-turn CLI crash, manager.ts lastTurnStatus before idle); verify:build byte for byte; hostile wails.localhost and gateway URLs rejected on win32/darwin/linux; each of 17 new guards broken by hand turned its test red. PR CI green.
274 lines
14 KiB
CSS
274 lines
14 KiB
CSS
/* Input area (§8.6 Composer) — option B: white card, 1px border, 14px radius, neutral grey focus ring */
|
|
.composer { flex: none; padding: 0 16px 16px; }
|
|
.cp-card {
|
|
width: 100%; max-width: var(--col); margin: 0 auto;
|
|
background: var(--bg); border-radius: 14px; border: 1px solid var(--cp-line);
|
|
padding: 12px 12px 8px 14px; box-shadow: 0 1px 2px rgb(0 0 0 / .04);
|
|
transition: border-color var(--dur-2) var(--ease), box-shadow var(--dur-2) var(--ease);
|
|
}
|
|
.cp-card:focus-within { border-color: var(--cp-focus); box-shadow: 0 0 0 3px var(--cp-ring), 0 1px 2px rgb(0 0 0 / .04); }
|
|
.cp-card.waiting { border-color: color-mix(in oklab, var(--warn) 45%, var(--bg)); }
|
|
/* 1.3 全部自动同意 (#727 review 1): a persistent one-line strip above the card (Nolan: one slim line is enough) for as long as the conversation is in it, plus a
|
|
warning-tinted card border and chip. The one exception to the grayscale accent: the semantic warning colour, darker in
|
|
light mode so small text stays readable (≥4.5:1 on the page background), lighter in dark mode. */
|
|
:root { --auto-fg: #b45309; --auto-bg: color-mix(in oklab, #f59e0b 10%, var(--bg)); --auto-line: color-mix(in oklab, #d97706 40%, var(--bg)); }
|
|
:root[data-theme="dark"] { --auto-fg: #fbbf24; --auto-bg: color-mix(in oklab, #f59e0b 13%, var(--bg)); --auto-line: color-mix(in oklab, #f59e0b 42%, var(--bg)); }
|
|
.cp-auto-on {
|
|
max-width: var(--col); margin: 0 auto 4px; display: flex; align-items: center; gap: 6px; min-width: 0;
|
|
height: 22px; padding: 0 4px; white-space: nowrap; overflow: hidden;
|
|
color: var(--muted); font-size: var(--fs-s); line-height: 22px;
|
|
}
|
|
.cp-auto-ic { flex: none; display: inline-flex; color: var(--auto-fg); }
|
|
.cp-auto-t { flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 6px; overflow: hidden; cursor: help; border-radius: var(--r-s); }
|
|
.cp-auto-t:focus-visible { outline: 2px solid var(--auto-line); outline-offset: 1px; }
|
|
.cp-auto-t b { min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--auto-fg); font-weight: 600; }
|
|
.cp-auto-on .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
|
|
.cp-auto-back {
|
|
flex: none; margin-left: auto; padding: 0 2px; border: 0; background: none; white-space: nowrap;
|
|
color: var(--fg); font-size: var(--fs-s); text-decoration: underline; text-underline-offset: 2px;
|
|
text-decoration-color: color-mix(in oklab, var(--fg) 35%, transparent); cursor: pointer;
|
|
}
|
|
.cp-auto-back:hover { text-decoration-color: currentColor; }
|
|
.cp-card.auto-on { border-color: var(--auto-line); }
|
|
.cp-card.auto-on:focus-within { border-color: var(--auto-fg); }
|
|
.cp-hint { max-width: var(--col); margin: 6px auto 0; font-size: var(--fs-xs); color: var(--meta); text-align: center; }
|
|
.att-note { padding: 6px 10px 0; color: var(--muted); font-size: var(--fs-s); }
|
|
.cp-ta-wrap { position: relative; }
|
|
.slash-pop {
|
|
position: absolute; left: 0; right: 0; bottom: 100%; margin-bottom: 6px;
|
|
max-height: min(240px, 40vh); overflow: hidden; display: flex; flex-direction: column;
|
|
z-index: 20;
|
|
}
|
|
.slash-pop .ap-scroll { max-height: inherit; }
|
|
.slash-pop .slash-h {
|
|
padding: 4px 10px 2px; font-size: var(--fs-xs); color: var(--muted); text-transform: uppercase;
|
|
letter-spacing: 0.04em;
|
|
}
|
|
.slash-pop .mi.slash-item {
|
|
height: auto; min-height: 28px; padding: 4px 10px; flex-direction: column; align-items: flex-start;
|
|
gap: 0;
|
|
}
|
|
.slash-pop .slash-name { font-weight: 500; }
|
|
.slash-pop .slash-desc { font-size: var(--fs-s); color: var(--muted); line-height: 1.3; }
|
|
.slash-pop .slash-hint { font-size: var(--fs-s); color: var(--muted); font-family: var(--font-mono); }
|
|
.slash-pop .mi.slash-item.sel { background: var(--surface-hover); }
|
|
|
|
.cp-ta {
|
|
width: 100%; border: 0; resize: none; background: none; outline: none; color: var(--text);
|
|
font-size: var(--chat-fs); line-height: calc(var(--chat-fs) * 1.62); min-height: 34px; max-height: calc(var(--chat-fs) * 1.62 * 12); overflow-y: auto;
|
|
display: block; padding: 0;
|
|
}
|
|
.cp-ta::placeholder { color: var(--meta); }
|
|
.cp-bar {
|
|
display: flex; align-items: center; flex-wrap: wrap; gap: 2px;
|
|
margin: 4px 0 0 -6px; min-width: 0;
|
|
}
|
|
|
|
/* Pill controls: 26px, 7px radius, 12px text. 1.3: every composer chip (agent·model, effort, permission, Fast) shares one
|
|
style: a filled 24px chip with an icon, a label and a ⌄ */
|
|
.pill-wrap { position: relative; flex: 0 1 auto; min-width: 0; max-width: 100%; }
|
|
.pill {
|
|
position: relative; display: inline-flex; align-items: center; gap: 5px; height: 26px; padding: 0 8px;
|
|
border-radius: 7px; background: none; color: var(--pill-fg, var(--muted)); border: 1px solid transparent;
|
|
font-size: var(--fs-s); max-width: min(240px, 100%); min-width: 0; white-space: nowrap; cursor: pointer;
|
|
transition: background var(--dur-1);
|
|
}
|
|
.pill:hover { background: var(--surface-hover); }
|
|
.pill svg { flex: none; }
|
|
.pill.chip { background: var(--chip-bg); border-color: var(--chip-line); padding: 0 8px 0 4px; gap: 6px; max-width: min(300px, 100%); }
|
|
.pill.chip:hover { background: var(--surface-hover); }
|
|
.chip-logo { border-radius: 5px; }
|
|
.chip-caret { color: var(--meta); }
|
|
.pill .p-a { font-weight: 500; color: var(--fg); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 0 0 auto; max-width: 120px; }
|
|
.pill .p-t { color: var(--meta); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1 1 auto; }
|
|
.pill .p-t::before { content: "·"; margin-right: 5px; }
|
|
.ipill .ip-l { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
|
|
.ipill:focus-visible { outline: 2px solid color-mix(in oklab, var(--accent) 45%, var(--bg)); outline-offset: -1px; }
|
|
.ipill[aria-expanded="true"] { background: var(--surface-hover); }
|
|
.ipill.danger { color: var(--danger); }
|
|
.cp-bar .pill { height: 24px; border-radius: 6px; background: var(--chip-bg); border-color: var(--chip-line); padding: 0 6px 0 7px; gap: 5px; }
|
|
.cp-bar .pill:hover, .cp-bar .pill[aria-expanded="true"] { background: var(--surface-hover); }
|
|
.cp-bar .pill.chip { padding: 0 6px 0 3px; }
|
|
.cp-bar .pill.chip .chip-logo { width: 16px; height: 16px; }
|
|
.cp-bar .ipill.danger { border-color: color-mix(in oklab, var(--danger) 35%, var(--chip-line)); }
|
|
.cp-bar { gap: 4px; }
|
|
/* 1.3: "2/3 tasks" above the composer while the latest turn has a step list */
|
|
.cp-tasks { max-width: var(--col); margin: 0 auto 6px; display: flex; }
|
|
.tasks-pill {
|
|
display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: var(--r-full);
|
|
border: 1px solid var(--chip-line); background: var(--bg); color: var(--muted); font-size: var(--fs-xs); font-variant-numeric: tabular-nums;
|
|
}
|
|
.tasks-pill:hover { color: var(--fg); background: var(--surface-hover); }
|
|
.tasks-pill svg { flex: none; color: var(--meta); }
|
|
/* 1.3 全部自动同意: Cursor's shield idea, a filled chip with a shield-check, in the warning colour (#727 review 1) */
|
|
.ipill.auto, .cp-bar .ipill.auto { color: var(--auto-fg); background: var(--auto-bg); border-color: var(--auto-line); font-weight: 600; }
|
|
.ipill.auto:hover, .ipill.auto[aria-expanded="true"], .cp-bar .ipill.auto:hover, .cp-bar .ipill.auto[aria-expanded="true"] { background: color-mix(in oklab, var(--auto-fg) 16%, var(--bg)); }
|
|
.ipill.auto svg { color: var(--auto-fg); }
|
|
.mi.warn .sm-label { color: var(--auto-fg); }
|
|
.ipill.static { cursor: default; }
|
|
.mode-menu { max-width: 300px; }
|
|
.cp-div { width: 1px; height: 14px; background: var(--line); margin: 0 4px; flex: none; }
|
|
.cp-bar > .ibtn { flex: none; }
|
|
.cp-attach { color: var(--pill-fg, var(--muted)); }
|
|
|
|
/* When the composer gets narrow (depends on the middle column's width, not the window) */
|
|
.cp-card { container-type: inline-size; container-name: composer; }
|
|
@container composer (max-width: 520px) {
|
|
.pill .p-t { display: none; }
|
|
.pill { max-width: min(160px, 100%); }
|
|
.ipill .ip-l { max-width: 64px; }
|
|
}
|
|
@container composer (max-width: 380px) {
|
|
.pill { max-width: min(120px, 100%); padding: 0 6px; }
|
|
.ipill .ip-l { display: none; }
|
|
}
|
|
|
|
/* Agent·model popover */
|
|
.pop {
|
|
position: absolute; bottom: 32px; left: 0; z-index: 55; width: 260px;
|
|
background: var(--bg); border-radius: var(--r-m); box-shadow: var(--shadow-pop);
|
|
padding: 4px; max-height: 60vh; overflow-y: auto;
|
|
}
|
|
.agent-picker {
|
|
width: min(300px, calc(100vw - 32px)); padding: 0; overflow: hidden;
|
|
display: flex; flex-direction: column; max-height: min(420px, 60vh);
|
|
}
|
|
.agent-picker .ap-search {
|
|
display: flex; align-items: center; gap: 8px; padding: 8px 10px;
|
|
border-bottom: 1px solid var(--line); flex: none; color: var(--muted);
|
|
}
|
|
.agent-picker .ap-search-in {
|
|
flex: 1; min-width: 0; border: 0; background: none; outline: none;
|
|
font-size: var(--fs-s); color: var(--fg);
|
|
}
|
|
.agent-picker .ap-search-in::placeholder { color: var(--muted); }
|
|
.agent-picker .ap-refresh {
|
|
flex: none; width: 24px; height: 24px; margin: -2px -4px -2px 0; padding: 0;
|
|
border: 0; border-radius: var(--r-s); background: transparent; color: var(--muted);
|
|
display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
|
|
}
|
|
.agent-picker .ap-refresh:hover:not(:disabled) { color: var(--fg); background: var(--surface-hover); }
|
|
.agent-picker .ap-refresh:disabled { opacity: .45; cursor: default; }
|
|
.agent-picker .ap-refresh.spinning svg { animation: ac-spin .8s linear infinite; }
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.agent-picker .ap-refresh.spinning svg { animation-duration: 2.4s; }
|
|
}
|
|
.agent-picker .ap-scroll {
|
|
overflow-y: auto; padding: 4px; flex: 1; min-height: 0;
|
|
}
|
|
.agent-picker .ap-empty {
|
|
padding: 12px 10px; font-size: var(--fs-s); color: var(--muted); text-align: center;
|
|
}
|
|
.agent-picker .ap-back {
|
|
font-weight: 600; margin-bottom: 2px;
|
|
}
|
|
.agent-picker .ap-back-icon {
|
|
display: inline-flex; transform: rotate(180deg); margin-right: 2px;
|
|
}
|
|
.agent-picker .mi-row {
|
|
display: flex; align-items: center; gap: 6px; width: 100%; text-align: left;
|
|
}
|
|
/* Provider list: name on the left, meta on the right, so tags like "Experimental" don't squeeze out the name */
|
|
.agent-picker .provider-pick-row {
|
|
justify-content: space-between;
|
|
gap: 8px;
|
|
}
|
|
.agent-picker .provider-pick-name {
|
|
flex: 0 1 auto;
|
|
min-width: 5.5rem;
|
|
max-width: 58%;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
font-weight: 500;
|
|
color: inherit;
|
|
}
|
|
.agent-picker .provider-pick-meta {
|
|
flex: 0 0 auto;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: flex-end;
|
|
gap: 6px;
|
|
min-width: 0;
|
|
margin-left: auto;
|
|
}
|
|
.agent-picker .provider-pick-meta .dlg-hint {
|
|
flex: none;
|
|
font-size: 10px;
|
|
max-width: 5rem;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
white-space: nowrap;
|
|
}
|
|
/* Model search rows still use mi-name / mi-sub */
|
|
.agent-picker .mi-row .mi-name {
|
|
flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
}
|
|
.agent-picker .mi-row .mi-sub {
|
|
flex: none; max-width: 38%; font-size: var(--fs-xs); color: var(--muted);
|
|
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
}
|
|
.agent-picker .model-pick-row {
|
|
min-width: 0;
|
|
}
|
|
.agent-picker .model-pick-name {
|
|
flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
}
|
|
.agent-picker .model-pick-default {
|
|
flex: 0 1 58%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
|
|
}
|
|
.agent-picker .mi-meta { flex: none; font-size: var(--fs-xs); color: var(--muted); white-space: nowrap; }
|
|
.agent-picker .mi-tag { flex: none; font-size: 10px; color: var(--accent); }
|
|
.agent-picker .mi-caret { flex: none; color: var(--muted); display: inline-flex; }
|
|
.agent-picker .mi-check { flex: none; margin-left: auto; color: var(--accent); }
|
|
|
|
.ap-sec { padding: 4px 0; }
|
|
.ap-sec .tinput { height: 26px; margin-bottom: 4px; }
|
|
.ap-sec .mi { height: 26px; font-size: var(--fs-s); }
|
|
|
|
/* Attachment strip */
|
|
.att-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 6px; }
|
|
.att {
|
|
display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 8px;
|
|
background: var(--surface-hover); border-radius: var(--r-s); font-size: var(--fs-s);
|
|
}
|
|
.att img { width: 22px; height: 22px; object-fit: cover; border-radius: 4px; }
|
|
.att.up { opacity: .6; }
|
|
.att-name { max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.att-x { color: var(--muted); font-size: 14px; line-height: 1; }
|
|
.att-x:hover { color: var(--fg); }
|
|
|
|
.cp-right { margin-left: auto; flex: none; display: flex; align-items: center; gap: 8px; }
|
|
.cp-clock { font-size: var(--fs-s); color: var(--meta); font-variant-numeric: tabular-nums; }
|
|
.cp-send, .cp-stop {
|
|
width: 30px; height: 30px; border-radius: 50%; flex: none;
|
|
display: inline-flex; align-items: center; justify-content: center;
|
|
transition: filter var(--dur-1), opacity var(--dur-1);
|
|
}
|
|
.cp-send { background: var(--accent); color: var(--accent-fg); }
|
|
.cp-send:hover { filter: brightness(1.08); }
|
|
.cp-send[disabled] { opacity: .35; cursor: default; filter: none; }
|
|
.cp-stop { background: var(--fg); color: var(--bg); }
|
|
.cp-stop:hover { filter: brightness(1.15); }
|
|
|
|
@media (max-width: 560px) {
|
|
.composer { padding: 0 10px 10px; }
|
|
}
|
|
|
|
/* 1.2: drop target while a Files-panel row is dragged over the composer */
|
|
.cp-card.drop-on { outline: 1.5px dashed var(--cp-focus); outline-offset: 2px; }
|
|
.cp-drop-hint { padding: 4px 10px 0; font-size: var(--fs-s); color: var(--muted); }
|
|
.att-bar .mention { height: 24px; }
|
|
|
|
/* 1.3 quotes from a text selection ("添加到对话") */
|
|
.qchip {
|
|
display: inline-flex; align-items: center; gap: 5px; height: 24px; max-width: 260px; padding: 0 4px 0 8px;
|
|
border-radius: 6px; background: var(--surface-hover); color: var(--fg); font-size: var(--fs-s); min-width: 0;
|
|
border-left: 2px solid color-mix(in oklab, var(--fg) 35%, transparent);
|
|
}
|
|
.qchip svg { flex: none; color: var(--muted); }
|
|
.qchip-t { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.qchip-n { flex: none; color: var(--meta); }
|
|
.qchip .att-x { flex: none; width: 18px; height: 18px; border-radius: 4px; }
|
|
.qchip .att-x:hover { background: color-mix(in oklab, var(--fg) 10%, transparent); }
|