cryingLiu on X asked to search the chat history of every agent magpie
reads sessions from: prompts and replies, from one place.
What the user gets:
- The Sessions page's search also lists, under the agent's own list,
the other agents' sessions whose conversation says the words, each
with a snippet. A hit opens the conversation in the sheet at the
message that said it (transcript?find=), with "N earlier messages
not shown"; the page itself never scrolls. While the index is still
being built the head says "Indexing sessions…" or "Indexing N of M
sessions…", and the page asks again every 3s until it is done.
- Magpie Sessions, a built-in MCP server in Library → MCP (Discover),
opt in per agent like the other magpie servers. Its tools are
search_sessions(query, agent?, limit) and read_session(id, around?),
both returning text. It runs as `magpie mcp sessions` over stdio and
reaches the gateway's /mcp/magpie/sessions, which serves only local
callers that are not browsers.
How it works:
- internal/sessions/said_index.go keeps said-v1.db beside sessions.json:
a contentless SQLite FTS5 index (detail=none) of the words each
session says. It is built from the sessions list sessions already
caches and refreshed at most every 10s: a new or rewritten file is
read once, a grown Claude Code or Codex file only from where it ended,
and a gone one is forgotten. A query asks the index which sessions
have every word, then reads only those files for the snippet, for at
most 6s. A search waits up to 2s for a refresh. While the first
listing is still running the answer says `listing`, so an empty first
answer is not read as "no session says it".
- Privacy: only agents sessions.Reads allows are indexed or searched;
nothing is read until the user has answered the sessions question,
and in gateway mode no agent's own files are read (the page doesn't
ask). Reset forgets the index.
- /api/sessions/said for the page; the CLI parity list names it.
Run, at this tree (rebased on origin/main 256910f17):
- gofmt -l clean; go vet on mote for darwin, GOOS=linux -tags nogui
and GOOS=windows: ok.
- go test -tags nogui ./... -timeout 45m on the WSL Linux box:
every package ok at c8e445c4b (the tree before the one-hit wording,
whose gateway tests ran again on mote: ok).
- GUI: the whole suite on mica at this head was still running when
this was pushed (owner: never hold a verified change behind a full
suite). Under mica's load, beside another session's full suite, 90
tests had failed so far, all in files this change doesn't touch
(accounts, Details, keys, plugins, providers); none in sessions,
library or i18n. The files this change reaches passed on their own
(below).
- Focused, green: internal/sessions (Said*, TranscriptAt),
internal/gateway (SessionsMCP*, own MCP, read-only, key slots),
internal/library (market, opt in), internal/gui (Said, Sessions,
gateway mode); GUI sessions-said, sessions-search, library-sessions-mcp,
vision-mcp-library, library-browser-setup and i18n-keys in chromium
and webkit, every language, wide and narrow.
- Broken by hand, one at a time, each red and green restored: the
index's Listing left out (TestSearchSaidWhileTheSessionsAreFound red
in 2.5s); the page ignoring `listing` (sessions-said 6 of 7 red); the
MCP's local/browser guard (TestSessionsMCPOnlyForAgentsHere red); the
server's opt in (TestSessionsServerInDiscover red); every Reads check
on the search path, the index's and SearchSession's together
(TestSearchSaidLeavesOutAgentsNotRead red). With those gone the
gateway-mode GUI test stays green, because the sessions listing
leaves an unread agent out before the index sees it.
- Real use, in a sandbox HOME with GOPATH, GOMODCACHE and GOCACHE
pinned, over the real history through symlinks (29 GB Claude Code,
60 GB Codex, 14,102 sessions), sessions reads set to all in the
sandbox: first listing ~60s cold (answers say still being found),
whole index built in 9m50s while queries answered in ~6s each, index
38 MB, a common word 4.9s and a rare word 1.0s warm, read_session at
the words of a huge session 1.8s, peak footprint 442 MB for the whole
process with the sessions cache. Nothing was written under the real
~/.claude or ~/.codex.
- The real binary end to end on mote, in a sandbox HOME: `magpie serve`
on a free port and `magpie mcp sessions` over stdio with
MAGPIE_GATEWAY, against a Claude Code session written there:
initialize, tools/list, search_sessions found it with its snippet,
read_session at the words started 3 messages before them, a word
nowhere said "No session says", and a POST with a web page's Origin
was refused 403. That run is how "1 sessions say" was found and
made "1 session says" (TestSessionsMCPSearch red before, green after).
Not tried: a real agent (Claude Code, Codex) calling the server it was
given from the Library, and the page against a real backend (the GUI
tests fake the API). The index on Windows and Linux ran only through
the Go suite.
245 lines
19 KiB
CSS
245 lines
19 KiB
CSS
/* Sessions: every session of an agent, by folder, to resume or delete (sessions.js) */
|
|
.sm-head { gap: 8px; height: auto; min-height: 34px; }
|
|
.sm-switch { min-width: 0; flex: 1; display: flex; align-items: center; }
|
|
.sm-agents { min-width: 0; max-width: 100%; }
|
|
.segs.sm-agents { background: var(--seg-track); }
|
|
.sm-agents .opt:not(.on, :hover) { color: var(--ctl-fg); }
|
|
.sm-agents .opt { display: inline-flex; align-items: center; gap: 5px; }
|
|
.sm-agents .opt.on { background: var(--mark-fill, var(--seg-thumb)); box-shadow: var(--seg-edge); }
|
|
.sm-agents .opt.on em { color: var(--muted); }
|
|
.sm-agents .opt .ic { width: 13px; height: 13px; }
|
|
.sm-agent-pick { min-width: 0; max-width: 220px; gap: 6px; color: var(--fg); }
|
|
.sm-agent-pick .ic { width: 13px; height: 13px; flex: none; }
|
|
.sm-agent-pick em, .sm-agents em, .sm-trash-btn em { font-style: normal; font-size: 10.5px; color: var(--faint); font-variant-numeric: tabular-nums; }
|
|
.pop.proto-menu.sm-agent-menu { width: min(280px, calc(100vw - 16px)); max-height: min(360px, 70vh); overflow-y: auto; background: var(--card); }
|
|
.sm-agent-menu .pm-item { align-items: center; }
|
|
.sm-agent-menu .pm-words { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex: 1; }
|
|
.sm-agent-menu .pm-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.sm-agent-menu .pm-note { flex: none; font-variant-numeric: tabular-nums; }
|
|
.sm-filter { width: 200px; flex: 0 1 200px; min-width: 110px; }
|
|
.sm-trash-btn { display: inline-flex; align-items: center; gap: 5px; flex: none; }
|
|
.sm-trash-btn.on { background: var(--pill); color: var(--fg); }
|
|
.sm-toset { flex: none; white-space: nowrap; }
|
|
.sm-body { display: flex; flex-direction: column; gap: 8px; flex: none; }
|
|
.sm-note { margin: 0 2px; }
|
|
/* where a session said what was searched for, the words themselves marked */
|
|
.row .sub.sm-hit { color: var(--fg-2); }
|
|
.sm-hit mark { background: var(--accent-soft); color: var(--fg); border-radius: 3px; padding: 0 1px; font-weight: 500; }
|
|
/* a hit's words open the conversation at them */
|
|
button.sub.sm-hit { display: block; width: 100%; height: auto; margin: 1px 0 0; padding: 0; border: 0; background: none; font: inherit; font-size: 11.5px; line-height: inherit; text-align: left; cursor: pointer; border-radius: 0; }
|
|
@media (hover: hover) and (pointer: fine) { button.sub.sm-hit:hover { color: var(--fg); background: none; } }
|
|
/* the same words in other agents' sessions, after the agent's own */
|
|
.sm-else-head { min-height: 32px; gap: 8px; }
|
|
.sm-else-head .name { flex: 1; font-size: 12px; font-weight: 500; color: var(--faint); }
|
|
.sm-else-head .note { flex: none; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
|
|
.sm-else > .row + .row { border-top: 1px solid var(--line-2); }
|
|
button.row.sm-else-row { width: 100%; gap: 10px; text-align: left; cursor: pointer; font: inherit; color: inherit; }
|
|
.sm-else-row > svg, .sm-else-row > img { flex: none; width: 16px; height: 16px; }
|
|
.sm-else-row .who { display: flex; flex-direction: column; min-width: 0; }
|
|
.sm-else-row .name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
/* the message a search opened the conversation at, and its words */
|
|
.sess-talk .sess-found { border-radius: 8px; box-shadow: 0 0 0 1px var(--accent-soft); }
|
|
::highlight(sess-found) { background: var(--accent-soft); color: var(--fg); }
|
|
.sess-from { margin-bottom: 8px; }
|
|
.sm-bar { gap: 8px; padding: 0 11px; }
|
|
.sm-bar .grow { flex: 1; }
|
|
.sm-bar .sm-delete, .sm-bar .sm-empty { display: inline-flex; align-items: center; gap: 5px; }
|
|
.sm-bar .sm-delete:disabled { opacity: .45; }
|
|
.sm-count { font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
|
|
.sm-check { flex: none; margin: 0; width: 14px; height: 14px; accent-color: var(--accent); }
|
|
.sm-tree { display: flex; flex-direction: column; gap: 8px; container: sm-tree / inline-size; }
|
|
.sm-group .skeleton.sk-line { width: 60%; height: 12px; }
|
|
.sm-select.on { background: var(--pill); color: var(--fg); }
|
|
/* the folders are one list, parted by hairlines, never a card each; the
|
|
sessions of an open one go on in it, set in under its name */
|
|
.sm-folders > .sm-group + .sm-group, .sm-folders > .sm-group + .sm-more-folders,
|
|
.sm-others > .sm-group, .sm-others > .sm-more-folders { border-top: 1px solid var(--line-2); }
|
|
.sm-group > .row.sm-folder + .sm-item { border-top: 1px solid var(--line-2); }
|
|
.sm-tree .sm-more-folders { margin: 6px 11px; }
|
|
.row.sm-folder, .row.sm-others-row { min-height: 44px; gap: 8px; }
|
|
.row.sm-folder .fold, .row.sm-others-row .fold { flex: 1; min-width: 0; margin: 0 0 0 -4px; padding: 4px 6px 4px 4px; gap: 8px; text-align: left; color: var(--faint); }
|
|
.row.sm-folder .fold:hover, .row.sm-others-row .fold:hover { background: none; }
|
|
.row.sm-folder:hover, .row.sm-others-row:hover { background: color-mix(in srgb, var(--pill) 40%, transparent); }
|
|
.sm-fwords { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 1px; }
|
|
.sm-fline { min-width: 0; display: flex; align-items: baseline; gap: 8px; }
|
|
.sm-fline .name, .sm-others-row .name { flex: none; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 500; color: var(--fg); }
|
|
.row.sm-folder .sm-path { flex: 0 1 auto; min-width: 0; margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--faint); }
|
|
.sm-latest { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: var(--muted); }
|
|
.sm-when { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
|
|
.sm-when .sm-ago { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
|
|
.row.sm-folder .note, .row.sm-others-row .note { flex: none; font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
|
|
/* what can be done to a whole folder waits under ⋯ until the row is pointed at */
|
|
.sm-folder-more { flex: none; opacity: 0; transition: opacity .12s; }
|
|
.row.sm-folder:hover .sm-folder-more, .row.sm-folder:focus-within .sm-folder-more, .sm-folder-more.open { opacity: 1; }
|
|
@media (hover: none) { .sm-folder-more { opacity: 1; } }
|
|
.sm-group .row.sm-sess { padding-left: 29px; }
|
|
body.window .sm-group .row.sm-sess { padding-left: 32px; }
|
|
.sm-others { margin-top: 4px; }
|
|
.row.sm-sess { min-height: 44px; }
|
|
.sm-item .sess-detail { padding-left: 34px; }
|
|
.row.sess .sm-del:hover { color: var(--red); background: var(--red-soft); }
|
|
/* carrying a session on in another agent, and its conversation (#845) */
|
|
.row.sm-sess .sess-carry { height: 24px; color: var(--fg); }
|
|
/* a control's room on a row without it (the icons' are .copy, as wide), so every row's columns line up
|
|
(ysm119 on Discord); and Resume is as wide when it says Copied */
|
|
.sm-slot { visibility: hidden; pointer-events: none; }
|
|
.sm-slot-resume { flex: none; height: 24px; padding: 0 10px; border: 0; border-radius: 7px; font-size: 11.5px; font-weight: 500; white-space: nowrap; }
|
|
.row.sm-sess .sm-slot-carry { height: 24px; }
|
|
.row.sm-sess [data-wide]::before, .row.sm-sess [data-wide]::after { content: attr(data-wide); display: block; height: 0; overflow: hidden; visibility: hidden; }
|
|
.row.sm-sess [data-wide]::after { content: attr(data-wide2); }
|
|
.row.sess .sm-del.off { opacity: .4; cursor: default; }
|
|
.row.sess .sm-del.off:hover { color: var(--muted); background: none; }
|
|
.pop.proto-menu.sess-carry-menu { width: min(300px, calc(100vw - 16px)); background: var(--card); }
|
|
.sess-talk-btn, .sess-export { height: 22px; padding: 0 8px; font-size: 11.5px; }
|
|
.sess-talk { max-height: min(560px, 70vh); overflow-y: auto; margin-top: 4px; padding: 8px 10px 4px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--bg); }
|
|
.sm-restore { display: inline-flex; align-items: center; gap: 5px; }
|
|
.sm-ask-list { grid-column: 1 / -1; min-width: 0; margin: 0; padding: 0; list-style: none; font-size: 12.5px; color: var(--fg); line-height: 1.6; }
|
|
.sm-ask-list li { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.sm-ask-list li.more { color: var(--muted); }
|
|
/* a field in a session dialog (#1991): its label above it, both across the
|
|
dialog, never squeezed into the form's 72px label column */
|
|
.editor label.sm-ask-field { grid-column: 1 / -1; min-width: 0; display: flex; flex-direction: column; gap: 6px; text-align: left; padding-top: 0; }
|
|
.editor label.sm-ask-field input { width: 100%; min-width: 0; }
|
|
.sm-ask-path { grid-column: 1 / -1; min-width: 0; margin: 0; font-family: var(--code-font, var(--code)); font-size: 11px; color: var(--muted); overflow-wrap: anywhere; }
|
|
:where(html[data-fonts]) .sm-ask-path { font-style: var(--code-style, inherit); font-weight: var(--code-weight, inherit); font-stretch: var(--code-stretch, 100%); }
|
|
@media (max-width: 560px) {
|
|
.sm-filter { width: 130px; flex-basis: 130px; }
|
|
.row.sm-folder .sm-path { display: none; }
|
|
/* the cost stays; the title keeps the room the tokens took (#752) */
|
|
.row.sm-sess .num { display: none; }
|
|
.row.sm-sess .cost { min-width: 0; }
|
|
/* five gaps of 12px left a 420px window's title 90px once the list
|
|
scrolled and its scrollbar took 10px */
|
|
.row.sess.sm-sess { gap: 8px; }
|
|
}
|
|
/* the list's own width, not the window's: beside the sidebar a 780px
|
|
window left a row's title "7" of its name, its tokens, cost, Resume and
|
|
Continue in taking the rest (cybercaius on Discord) */
|
|
@container sm-tree (max-width: 700px) {
|
|
.row.sm-sess .num { display: none; }
|
|
.row.sm-sess .cost { min-width: 0; }
|
|
.row.sess.sm-sess { gap: 8px; }
|
|
}
|
|
/* narrower still, the title has the first line to itself and what is done
|
|
with the session goes under it, on the right */
|
|
@container sm-tree (max-width: 600px) {
|
|
.row.sess.sm-sess { flex-wrap: wrap; justify-content: flex-end; row-gap: 4px; padding-top: 7px; padding-bottom: 7px; }
|
|
.row.sm-sess > .who { flex-basis: 100%; }
|
|
.row.sm-sess:has(> .sm-check) > .who { flex-basis: calc(100% - 22px); }
|
|
/* the title has its own line: the cost keeps its width again, so each
|
|
row's second line wraps at the same place and lines up (ysm119) */
|
|
.row.sm-sess .cost { min-width: 58px; }
|
|
}
|
|
@media (max-width: 420px) {
|
|
.sm-head { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; row-gap: 6px; }
|
|
.sm-switch { grid-column: 1 / -1; }
|
|
.sm-agent-pick { max-width: 100%; }
|
|
.sm-filter { grid-column: 1; grid-row: 2; width: 100%; min-width: 0; }
|
|
.sm-select { grid-column: 2; grid-row: 2; }
|
|
.sm-trash-btn { grid-column: 3; grid-row: 2; justify-self: end; }
|
|
.sm-toset { grid-column: 4; grid-row: 2; }
|
|
}
|
|
/* Codex sessions made with another provider, hidden from Codex's history (#887) */
|
|
.row.sm-provider { gap: 10px; min-height: 40px; padding: 8px 11px; height: auto; }
|
|
.sm-provider-text { min-width: 0; font-size: 12px; color: var(--fg-2); line-height: 1.45; }
|
|
.sm-provider .grow { flex: 1; }
|
|
.sm-provider .text { flex: none; display: inline-flex; align-items: center; gap: 5px; }
|
|
.sm-prov { display: inline-block; padding: 0 5px; border-radius: 4px; background: var(--pill); color: var(--muted); font-family: var(--code-font, var(--code)); font-size: 10.5px; line-height: 16px; }
|
|
:where(html[data-fonts]) .sm-prov { font-style: var(--code-style, inherit); font-weight: var(--code-weight, inherit); font-stretch: var(--code-stretch, 100%); }
|
|
.sm-provider-list li label { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
|
|
.sm-provider-list li .name { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.sm-provider-list li .note { flex: none; font-size: 11px; color: var(--faint); }
|
|
.sm-provider-list { max-height: min(300px, 45vh); overflow-y: auto; }
|
|
.sm-provider-pick { grid-column: 1 / -1; min-width: 0; display: flex; align-items: center; gap: 4px 12px; flex-wrap: wrap; }
|
|
.sm-provider-pick .grow { flex: 1; }
|
|
.sm-provider-pick .text { flex: none; font-size: 12px; }
|
|
/* Recording gateway conversations (#1355): a setting card above the list,
|
|
its switch, what it keeps and where, and a labelled delete */
|
|
.list.row.sm-record { gap: 6px 12px; min-height: 48px; padding: 9px 11px 9px 13px; height: auto; flex-wrap: wrap; }
|
|
.sm-record .lib-switch { cursor: pointer; padding: 0; border: 0; }
|
|
.sm-record .lib-switch:disabled { opacity: .5; cursor: default; }
|
|
.sm-record-words { flex: 1 1 240px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
|
|
.sm-record-name { font-size: 12.5px; font-weight: 500; color: var(--fg); }
|
|
.sm-record-sub { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
|
|
.sm-record-clear { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 5px; }
|
|
.sm-record-clear:hover:not(:disabled) { color: var(--red); background: var(--red-soft); }
|
|
/* a folder's next page of sessions, under the ones drawn */
|
|
.sm-group .sm-more { margin: 4px 8px 6px; }
|
|
/* a session's subagents, folded under it (#2261): set in by how deep they
|
|
are, never marked off by a stripe */
|
|
.sm-subs { --sub-step: 16px; padding: 0 12px 6px calc(30px + var(--sub-depth, 0) * var(--sub-step)); }
|
|
.sm-subs-fold { font-size: 11.5px; }
|
|
.sm-subs-fold span { font-variant-numeric: tabular-nums; }
|
|
.sm-subs-list { display: flex; flex-direction: column; margin-top: 2px; border: 1px solid var(--line-2); border-radius: 9px; overflow: hidden; background: var(--card); }
|
|
.sm-subs-list > .sess-item .sess-detail { padding-left: 12px; }
|
|
/* set in, a thread's details have less room: a line's buttons go under it */
|
|
.sm-subs-list .sess-line { flex-wrap: wrap; }
|
|
.sm-subs-list > .sm-sub + .sm-sub, .sm-subs-list > .sess-item + .sm-sub, .sm-subs-list > .sm-sub + .sess-item { border-top: 1px solid var(--line-2); }
|
|
.sm-subs-list > .sess-item > .sm-subs { padding-left: calc(8px + var(--sub-step)); }
|
|
.sm-sub.open { background: color-mix(in srgb, var(--pill) 45%, transparent); }
|
|
.row.sm-sub-row { width: 100%; min-height: 38px; text-align: left; padding-left: calc(11px + var(--sub-in, 0) * var(--sub-step)); }
|
|
body.window .row.sm-sub-row { min-height: 42px; padding-left: calc(14px + var(--sub-in, 0) * var(--sub-step)); }
|
|
.row.sm-sub-row .who { display: flex; flex-direction: column; }
|
|
@media (max-width: 560px) {
|
|
.sm-subs { --sub-step: 10px; padding-left: calc(12px + var(--sub-depth, 0) * var(--sub-step)); padding-right: 8px; }
|
|
}
|
|
|
|
/* the consent (RustCats on X): which agents' sessions may be read, asked
|
|
before any is; a plain grouped list of switches, as System Settings */
|
|
.sm-consent { display: flex; flex-direction: column; gap: 10px; max-width: 560px; margin: 8px auto 16px; padding: 18px 18px 16px; border-radius: 12px; background: var(--card, var(--bg)); box-shadow: 0 0 0 0.5px var(--line); }
|
|
.sm-consent-title { font-size: 14px; font-weight: 600; color: var(--fg); }
|
|
.sm-consent-sub, .sm-consent-none { margin: 0; font-size: 12px; line-height: 1.5; color: var(--muted); }
|
|
.sm-consent-list { margin: 2px 0 0; }
|
|
.sm-consent-row { display: flex; align-items: center; gap: 10px; min-height: 36px; padding: 6px 12px; cursor: pointer; }
|
|
.sm-consent-row > svg, .sm-consent-row > img { flex: none; width: 16px; height: 16px; }
|
|
.sm-consent-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--fg); }
|
|
.sm-consent-row .lib-switch { flex: none; cursor: pointer; padding: 0; border: 0; }
|
|
.sm-consent-row .lib-switch:disabled { opacity: .5; cursor: default; }
|
|
.sm-consent-acts { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 4px; }
|
|
/* a session's output speed (session_speed.go): its last two minutes and
|
|
tokens a second now, opening the round's numbers */
|
|
.row.sm-sess .sm-speed { flex: none; display: inline-flex; align-items: center; gap: 10px; height: 30px; padding: 0 8px; border: 0; border-radius: 7px; background: none; color: var(--muted); font: inherit; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; transition: background-color .15s ease; }
|
|
.row.sm-sess .sm-speed[hidden] { display: none; }
|
|
@media (hover: hover) and (pointer: fine) { .row.sm-sess .sm-speed:hover { background: var(--pill); } }
|
|
.row.sm-sess .sm-speed.open { background: var(--pill); }
|
|
.row.sm-sess .sm-speed:active { transform: scale(.97); }
|
|
.sm-speed .sm-curve { display: block; flex: none; }
|
|
.sm-speed-val { min-width: 72px; text-align: right; }
|
|
.sm-speed-val.live { color: var(--fg); }
|
|
.sm-speed-val b { font-size: 13px; font-weight: 600; }
|
|
.sm-speed-val small { font-size: 11px; color: var(--muted); }
|
|
.sm-curve-line { fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linejoin: round; }
|
|
.sm-curve-fill { fill: var(--accent); fill-opacity: .08; }
|
|
.sm-curve-gap { stroke: var(--faint); stroke-width: 1.5; stroke-dasharray: 3 3; }
|
|
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sm-curve-fill { fill-opacity: .1; } }
|
|
:root[data-theme="dark"] .sm-curve-fill { fill-opacity: .1; }
|
|
/* a narrow list keeps the number and leaves the curve to the popover */
|
|
@container sm-tree (width < 620px) { .sm-speed .sm-curve { display: none; } .sm-speed-val { min-width: 0; } }
|
|
.pop.sm-speed-pop { width: min(340px, calc(100vw - 16px)); max-height: none; padding: 14px 16px; gap: 10px; transform-origin: right top; font-variant-numeric: tabular-nums; }
|
|
.pop.sm-speed-pop.up { transform-origin: right bottom; }
|
|
.sm-sp-head { display: flex; align-items: baseline; gap: 6px; }
|
|
.sm-sp-big { font-size: 28px; font-weight: 600; letter-spacing: -.02em; color: var(--fg); }
|
|
.sm-sp-unit { font-size: 12px; color: var(--muted); }
|
|
.sm-sp-chart { position: relative; height: 72px; }
|
|
.sm-sp-chart .sm-curve { width: 100%; }
|
|
.sm-sp-gap { position: absolute; bottom: 8px; font-size: 10.5px; color: var(--muted); white-space: nowrap; pointer-events: none; }
|
|
.sm-sp-dot { position: absolute; right: -4px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--card); }
|
|
.sm-sp-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 10px; border-top: 1px solid var(--line-2); }
|
|
.sm-sp-stats > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
|
|
.sm-sp-k { font-size: 11px; color: var(--muted); }
|
|
.sm-sp-v { font-size: 13px; font-weight: 500; color: var(--fg); white-space: nowrap; }
|
|
|
|
/* a conversation in a sheet of its own: the turns, top and bottom in its head */
|
|
.modal .editor.sess-sheet { height: min(760px, calc(100vh - 80px)); }
|
|
.modal .editor.sess-sheet > .ehead { gap: 4px; }
|
|
.modal .editor.sess-sheet > .ehead b { min-width: 0; margin-right: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.modal .editor.sess-sheet > .ebody { display: block; outline: none; }
|
|
.sess-sheet .sess-talk { max-height: none; overflow: visible; margin: 0; padding: 0; border: 0; background: none; }
|
|
.sess-turns { flex: none; min-width: 5ch; margin-right: 4px; text-align: right; font-size: 11.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
|
|
.sess-nav { flex: none; width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px; background: none; color: var(--muted); cursor: pointer; transition: background-color .12s ease, color .12s ease, transform .1s cubic-bezier(.23, 1, .32, 1); }
|
|
.sess-nav:disabled { opacity: .35; cursor: default; }
|
|
.sess-nav:focus-visible { outline: 2px solid var(--accent, var(--fg)); outline-offset: 1px; }
|
|
@media (hover: hover) and (pointer: fine) { .sess-nav:not(:disabled):hover { background: var(--pill); color: var(--fg); } }
|
|
.sess-nav:not(:disabled):active { transform: scale(.97); }
|
|
@media (max-width: 560px) { .sess-turns { display: none; } }
|