page-agent-console 1.1.0, by qingnian108 (#569). QA fixes B1-B21, a reworked UI, a new logo, and self-heal after a plugin host restart. In this version: - Accent: a fixed neutral grey (charcoal in light mode, light grey in dark mode). Magpie's accent tokens are dropped on purpose. Surfaces, text, lines, fonts and semantic colours still follow magpie. - Every native <select> (composer effort/mode/Cursor fast, Settings, Debug) is now the page's own SelectMenu, a button plus a listbox. - The registry summary again discloses the 127.0.0.1 service and its lifecycle, that only its own page gets the token, the ~46 MB first install, and that Claude Code isn't bundled (en, zh). - session.js is written once at bind with beat:false, and beats every 4s only after the first /open. A new host deletes a dead host's session.js at startup (owner pid in session-owner.json, outside the page folder). - The daemon swallows console EPIPE after a hard host kill and handles a lifeline close once. Run at 930c6e2 on macOS (mote, Node 22), in a fresh copy: - npm ci, then npm run check (tsc daemon + web): ok - npx vitest run: 46 files, 288 passed, 17 skipped - npm run verify:build: app.js, app.css, index.html and daemon/dist/main.js(.map) rebuild byte-identical - bun scripts/check.mjs agent-console: ok - Playwright Chromium and WebKit, light and dark, sandbox HOME, page served under /_magpie/plugin/<id>/page with a stub bridge passing accent #ff0000: - accent: --accent and the primary button stay grey (rgb(38,38,38) light, rgb(229,229,229) dark); no <select> anywhere. - Settings menus: click opens the menu inside the window; ArrowDown+Enter picks, closes and refocuses the trigger; the pick persists through the daemon. - Esc closes the menu, not the dialog, and then closes the dialog. Clicking an option keeps the dialog open; a click outside closes the menu. - A host that was never opened writes beat:false and doesn't rewrite session.js. SIGKILL it, start a new host: the stale file is removed and the page reaches the new daemon. - After an open, session.js beats. SIGKILL the host: the page heals in ~5.3s and stays. A daemon-only crash heals in ~5.3s. - Daemon logs: no uncaughtException or EPIPE, one lifeline line per daemon exit. Not tried: the composer pickers in a browser (they need a thread with an installed agent; same SelectMenu component), magpie's real sandboxed frame, Windows and Linux.
158 lines
8.6 KiB
CSS
158 lines
8.6 KiB
CSS
/* Conversation items (§8.6): user bubble, body, thinking, tool group, cards, turn end, Markdown */
|
|
|
|
/* User message: bubble on the right */
|
|
.um-row { display: flex; flex-direction: column; align-items: flex-end; margin: 4px 0 16px; }
|
|
.um {
|
|
position: relative; max-width: 78%;
|
|
background: var(--accent-soft); border-radius: 14px 14px 4px 14px; color: var(--fg);
|
|
padding: 6px 12px; font-size: var(--fs-l); line-height: 1.6;
|
|
white-space: pre-wrap; word-break: normal; overflow-wrap: break-word;
|
|
}
|
|
.um:hover .um-act { display: flex; }
|
|
.um-act { position: absolute; left: -62px; top: 4px; display: none; gap: 2px; }
|
|
.um-act .ibtn { width: 24px; height: 24px; }
|
|
.um-img { display: block; max-width: 200px; max-height: 140px; border-radius: var(--r-s); margin-bottom: 6px; cursor: zoom-in; }
|
|
.um-tag { font-size: var(--fs-s); color: var(--muted); margin-top: 2px; }
|
|
|
|
/* Streaming cursor for the body */
|
|
.as { margin: 4px 0; }
|
|
.md.streaming::after { content: "▍"; color: var(--accent); animation: breathe 1s infinite; }
|
|
|
|
/* Markdown */
|
|
.md { font-size: var(--fs-l); line-height: 1.75; color: var(--text); word-break: normal; overflow-wrap: break-word; }
|
|
.md p { margin: 0 0 8px; }
|
|
.md > :last-child { margin-bottom: 0; }
|
|
.md a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; text-decoration-color: color-mix(in oklab, var(--accent) 40%, transparent); }
|
|
.md a:hover { text-decoration: underline; }
|
|
.md pre {
|
|
position: relative; background: var(--code-bg); border: 1px solid var(--code-line); border-radius: var(--r-m);
|
|
padding: 10px 12px; overflow-x: auto; font-family: var(--font-mono); font-size: var(--fs-s); line-height: 1.55;
|
|
}
|
|
.md code { font-family: var(--font-mono); font-size: 12.5px; background: var(--code-bg); color: var(--code-fg); padding: 1px 5px; border-radius: 4px; border: 1px solid var(--code-line); }
|
|
.md pre code { background: none; padding: 0; border: 0; color: inherit; }
|
|
.md ul, .md ol { margin: 6px 0; padding-left: 22px; }
|
|
.md h1, .md h2, .md h3, .md h4 { margin: 12px 0 6px; font-size: var(--fs-l); font-weight: 600; }
|
|
.md blockquote { margin: 6px 0; padding-left: 12px; border-left: 3px solid var(--line); color: var(--muted); }
|
|
.md table { border-collapse: collapse; margin: 8px 0; }
|
|
.md th, .md td { border: 1px solid var(--line); padding: 4px 10px; font-size: var(--fs-s); }
|
|
.cb-copy {
|
|
position: absolute; top: 6px; right: 6px; font-size: var(--fs-s); color: var(--muted);
|
|
padding: 2px 8px; border-radius: var(--r-s); background: var(--bg); opacity: 0; transition: opacity var(--dur-1);
|
|
}
|
|
.md pre:hover .cb-copy { opacity: 1; }
|
|
.cb-copy:hover { color: var(--fg); }
|
|
|
|
/* Thinking (collapsed gray text) / todo */
|
|
.rs-item { margin: 4px 0 6px; }
|
|
.rs-head {
|
|
display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0;
|
|
color: var(--meta); font-size: var(--fs-s);
|
|
}
|
|
.rs-head:hover { color: var(--fg); }
|
|
.rs-head .caret { display: inline-block; transition: transform var(--dur-1); }
|
|
.rs-head .caret.open { transform: rotate(90deg); }
|
|
.rs-body { margin: 2px 0 6px 5px; padding-left: 12px; border-left: 1px solid var(--line); color: var(--muted); font-size: var(--fs-s); line-height: 1.65; white-space: pre-wrap; }
|
|
.todo-list { margin: 2px 0 6px 5px; padding-left: 12px; border-left: 1px solid var(--line); list-style: none; font-size: var(--fs-s); }
|
|
.todo { color: var(--muted); }
|
|
.todo.in_progress { color: var(--fg); }
|
|
|
|
/* Tool group */
|
|
.tg { margin: 4px 0 10px; }
|
|
.tg-head {
|
|
display: flex; align-items: center; gap: 6px; width: 100%; height: 24px; padding: 0;
|
|
color: var(--meta); font-size: var(--fs-s); text-align: left;
|
|
}
|
|
.tg-head:hover { color: var(--fg); }
|
|
.tg-head .caret { transition: transform var(--dur-1); }
|
|
.tg-head .caret.open { transform: rotate(90deg); }
|
|
.tg-live { margin-left: auto; color: var(--accent); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
|
|
.tg-list { margin: 2px 0 0 5px; border-left: 1px solid var(--line); padding-left: 6px; }
|
|
.ts-head {
|
|
display: flex; align-items: center; gap: 8px; width: 100%; height: 26px; padding: 0 6px;
|
|
border-radius: var(--r-s); font-size: 12.5px; text-align: left; color: var(--text);
|
|
}
|
|
.ts-head:hover { background: var(--surface-hover); }
|
|
.ts-ic { width: 14px; flex: none; text-align: center; }
|
|
.ts-ic.ok { color: var(--ok); }
|
|
.ts-ic.fail { color: var(--danger); }
|
|
.ts-ic.run { color: var(--accent-2); animation: breathe 1.2s infinite; }
|
|
.ts-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.ts-meta { flex: none; color: var(--meta); font-variant-numeric: tabular-nums; }
|
|
.ts-meta.err { color: var(--danger); }
|
|
.ts-out { margin: 2px 8px 6px 30px; }
|
|
.ts-out pre {
|
|
background: var(--code-bg); border-radius: var(--r-s); padding: 8px 10px;
|
|
font-family: var(--font-mono); font-size: var(--fs-s); line-height: 1.5;
|
|
overflow-x: auto; white-space: pre-wrap; word-break: break-all; margin: 0;
|
|
}
|
|
.ts-more { font-size: var(--fs-s); color: var(--accent); margin-bottom: 4px; }
|
|
|
|
/* diff (unified view, red/green backgrounds) */
|
|
.diff { margin: 2px 6px 6px 22px; border: 1px solid var(--line); border-radius: var(--r-m); overflow: hidden; }
|
|
.diff-path { padding: 4px 10px; font-size: var(--fs-s); color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--line); font-family: var(--font-mono); }
|
|
.diff-pre { margin: 0; padding: 6px 0; font-family: var(--font-mono); font-size: var(--fs-s); line-height: 1.5; overflow-x: auto; }
|
|
.dh-head { display: block; color: var(--muted); padding: 0 10px; }
|
|
.dl { display: block; padding: 0 10px; white-space: pre-wrap; word-break: break-all; }
|
|
.dl.add { background: var(--add-bg); }
|
|
.dl.del { background: var(--del-bg); }
|
|
|
|
/* Cards (plan/permission/question/error) */
|
|
.card { margin: 8px 0; border-radius: 10px; padding: 12px 14px; }
|
|
.card.plan { border: 1px solid var(--line); }
|
|
.card.perm { border: 1px solid color-mix(in oklab, var(--warn) 30%, var(--bg)); background: color-mix(in oklab, var(--warn) 3%, var(--bg)); }
|
|
.card.perm.done { border-color: var(--line); opacity: .75; }
|
|
.card.ask { border: 1px solid color-mix(in oklab, var(--info) 45%, var(--bg)); }
|
|
.card.ask.done { border-color: var(--line); opacity: .75; }
|
|
.err-card { border: 1px solid color-mix(in oklab, var(--danger) 45%, var(--bg)); }
|
|
.err-line { color: var(--danger); font-size: var(--fs-m); }
|
|
.perm-title { font-size: var(--fs-m); font-weight: 500; }
|
|
.perm-cmd {
|
|
margin: 8px 0 0; background: var(--code-bg); border-radius: var(--r-s); padding: 8px 10px;
|
|
font-family: var(--font-mono); font-size: var(--fs-s); white-space: pre-wrap; word-break: break-all;
|
|
}
|
|
.perm-path { margin-top: 6px; font-family: var(--font-mono); font-size: var(--fs-s); color: var(--muted); }
|
|
.perm-btns { display: flex; gap: 8px; margin-top: 10px; }
|
|
.perm-done { margin-top: 8px; font-size: var(--fs-s); color: var(--muted); }
|
|
.ask-q { margin-bottom: 10px; }
|
|
.ask-t { font-size: var(--fs-m); font-weight: 500; margin-bottom: 6px; }
|
|
.ask-opts { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
|
|
.ask-free { margin-top: 4px; }
|
|
.ask .btn.primary { margin-top: 4px; }
|
|
|
|
/* Notices */
|
|
.nt { margin: 8px 0; text-align: center; font-size: var(--fs-s); color: var(--muted); }
|
|
.nt.warn { color: var(--warn); }
|
|
.nt.error { color: var(--danger); }
|
|
|
|
/* Turn end: small right-aligned text */
|
|
/* Turn end: "3s · copy · retry" left-aligned under the reply */
|
|
.te { display: flex; justify-content: flex-start; align-items: center; gap: 2px; margin: 4px 0 18px -6px; font-size: var(--fs-s); color: var(--meta); }
|
|
.te-meta { padding: 0 6px; font-variant-numeric: tabular-nums; }
|
|
.te-act {
|
|
height: 24px; min-width: 24px; display: inline-flex; align-items: center; justify-content: center; gap: 4px;
|
|
padding: 0 5px; border-radius: var(--r-s); color: var(--meta);
|
|
}
|
|
.te-act span { display: none; }
|
|
.te-act:hover { background: var(--surface-hover); color: var(--fg); }
|
|
.te-files { color: var(--accent); font-size: var(--fs-s); margin-left: 6px; }
|
|
.te-files:hover { text-decoration: underline; }
|
|
|
|
/* Empty state */
|
|
.empty-wrap {
|
|
min-height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center;
|
|
padding-bottom: 14vh;
|
|
}
|
|
.cp-hero-t { font-size: var(--fs-hero); font-weight: 600; }
|
|
.cp-hero-s { margin-top: 6px; font-size: var(--fs-s); color: var(--muted); }
|
|
.empty-actions { margin-top: 16px; }
|
|
.workspace-empty { padding-bottom: 10vh; }
|
|
|
|
/* queue list */
|
|
.q-list { max-width: var(--col); margin: 0 auto 6px; display: flex; flex-direction: column; gap: 4px; }
|
|
.q-item {
|
|
display: flex; align-items: center; gap: 8px; padding: 4px 10px;
|
|
background: var(--surface); border-radius: var(--r-s); font-size: var(--fs-s);
|
|
}
|
|
.q-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.q-item .ibtn { width: 20px; height: 20px; }
|