c9e8422fa8c2b8eb96dfb7ff0c91c2caef1306bd
640
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
dbbb2f26b1 |
groups: free: takes the models a catalog marks free (#5903)
A routing group's pattern may now start with free: (provider.FreePrefix): free:workbuddy/* is, of the models workbuddy/* matches, those whose catalog entry says free (Entry.Free, the vendor's or plugin's own flag as the catalog was last read). The rest after free: is a glob, a re: pattern or an id, matched as on its own, so free:re:workbuddy/hy.* works too. It is expanded where every pattern is (matchesIn, PatternHits) each time the groups are read, from the catalog magpie already keeps: no request to a vendor, and a model the next list marks free joins without a save. Only the flag decides. A $0 price (PricedFree), a rate of 0, an account named Free or "free" in an id never counts; the test holds a deepseek-v4-free id with no flag, a rate-0 model and an or/y priced at $0 out. Existing patterns read as before: openrouter/*:free still means ids ending in :free (that is why the rule is a prefix, not a :free suffix), and a provider's AutoInclude takes no free: (isIDPattern). GUI: the Routing editor's pattern box counts and lists a free: rule live as it does any pattern (patternTest in plugins/routing/client.js, from groups.models' free), refuses "free:" alone, and one hint line says the flag is the last catalog's, not a promise of no charge, in en, zh, zh-TW, ja and de. CLI help, docs/subsystems/providers-accounts.md and the site's routing-groups page (en, zh, ja) say the same. routing-levels.test.cjs: the Advanced hint line made the editor taller, so the second group's Levels row opened under the editor's sticky foot and the click landed on the foot (webkit en). The test already wheels to that row for its first group; it now does for the second too. Run: - TestGroupFreeRule, TestFreeRuleSyntax and the existing pattern tests pass. Broken by hand: with groupmatch.go and autolist.go from origin/main both are red (no members for free:workbuddy/*, IsPattern); with takes() ignoring the flag, TestGroupFreeRule is red (all six WorkBuddy models matched). - group-free-rule.test.cjs (new): chromium and webkit, en and zh, green; red with origin/main's client.js. - go vet ./... (darwin, mica), GOOS=linux go vet -tags nogui ./..., GOOS=windows go vet ./...: clean. gofmt -l: nothing. - Full suite go test -tags nogui -timeout 45m ./... on Linux (WSL magpie-desktop) at 1e180c630 (this change on |
||
|
|
b0674b9ec4 |
providers: a key's balance shows on its row, as Usage last read it
lyj1115 on X: magpie found the relay's balance (the probe), but the Providers row showed only the API key; the figure was on Usage alone. The row's quiet facts line (host · models) now ends in " · $10472.14", in the line's own colour and size, with "Balance $…" as its tooltip. Several keys' balances are added up as the Usage card's head adds them (shared balances counted once), else the key in use's. A failed read, a signed-in account (its windows are on Usage) and Usage turned off show none. Opening Providers asks for Usage's own read (never ?asked=1, so "read only when asked" holds) when it is over a minute old, as Routing does (#1833); rows are marked after the list is drawn and after a read. rowBalance, markBalances and keysSum/keysSumTip live in plugins/usage/page.js (keysSum moved out of app.js) so app.js stays under its code budget without a raise; app.js calls markBalances?.(). No new words, no CSS. Run (mote, at this tree rebased on origin/main |
||
|
|
8608ce0243 |
gui: the sticky tab strips are drawn only under scrolled rows, rounded and evenly inset (CHENGJIAHEGOXIS on X)
Over a background picture the Library tab bar showed a square frosted box
around the rounded tabs, 16px out at the sides, 8 at the top and 4 at the
foot. The strip behind the tabs (Library, Plugins, Settings, the Add
sheet) is now drawn only once rows scroll under it (.stuck), fading in
with opacity, so at the top only the track shows: radius 7, an even 2px
around its 5px pills. When drawn, it sits 4px out from the tabs with
radius 11 at its foot (Library, Plugins), and 6px out with radius 13 in
Settings and the Add sheet.
Run: shots in Chromium and WebKit, light and dark, with and without a
wallpaper, at 1280 and 640, at rest and scrolled, before and after
(strip opacity 0 at rest, insets 4/4/4 when stuck). Full GUI suite at
18ec1674a on mote: 1041 fails across ~118 files; those files at
|
||
|
|
34606000da |
gui: the tray panel's Usage tab ends in a heatmap of recent weeks (eiyuuzaki2333 on X)
Asked for "a heatmap like GitHub's / Codex's, also in the tray". The window already has one (Usage › Requests, 53 weeks, #1369), so no second copy goes on the Overview, which counts gateway calls only while the heatmap counts session-file calls too. The tray panel had none. The panel's Usage tab now ends in a card of the recent weeks, one cell a day, Monday on top, as many weeks as the card fits (8 to 53: about 25 at the panel's 440, 17 at 320). It goes after the chart and ranking, so nothing above it moves. Its shades are the existing monochrome accent ramp (.l0 to .l4) and follow the tab's own Tokens / Cost / Requests switch, with no new read; a provider or computer picked above narrows it. A tooltip says the day and its tokens, requests and cost. Weeks with no call show no card. No animation. It reads the existing cached /api/usage/heatmap, at most once a minute and again when a pick changes; the tab's own 10 s reads don't wait for it, and no endpoint was added. The card, its reads and tooltip live in plugins/usage/page.js, which shares its grid (heatGridOf, taken out of drawLedHeat as it was) and tooltip (ledHeatTip, now told the metric and provider) with the Requests tab. app.js keeps one guarded call in renderPanelUse: the ledger read can come back before page.js has run, so page.js draws the tab again when it loads. Both script budgets hold it at this base with no raise. The card is .pu-heat, not .pu-card, so the chart's card stays the tab's one .pu-card. The panel's light pills are its card's white, so a quiet day there is a 7% shade of the text over the card. Run (rebased on origin/main |
||
|
|
8707ea7757 |
gateway: Codex's prompt suggestions go on a model set for them (@0xcb198609 on X)
The Codex app's home-page prompt suggestions (thread_source ambient_suggestions, and their safety check, ambient_suggestion_safety; the Routing page's 提示词建议) are a background agentic turn that reads the project and connected apps. The app asks for the model its server config names (codex-app-model-routing's codex_ambient_suggestions_model_slug, gpt-6-luna) with provider model fallback on, so with magpie as Codex's provider they ran on the provider's default model, often auto: @0xcb198609 saw 76.9k tokens in 113s on deepseek-v4-pro. Codex has no config.toml key for that model, only an on/off switch in the app (store key ambient-suggestions-enabled, Settings › Configuration › Homepage suggestions; read from the 26.1106 bundle). magpie now has a setting for it, "Codex prompt suggestions" in Codex's row on the Agents page (Settings, beside Codex composer predictions): - Empty, the default, is Codex's own pick: nothing moves. A value the user set is never overridden. - A model or group of magpie's puts both calls there: in serve as the codex-suggestions move (the Routing page says why), and on the ChatGPT backend's route before the split, carrying the asked model to serve so the trace and ledger keep it. codexOwnOffMagpie leaves a bare gpt-6-luna to magpie while the setting is on (codexSideSet). - A target that is disabled, unserved or not allowed to the gateway key leaves the call as asked, with a log line (compactRefused). - To fit app.js's script budget without raising it, the suggestions and auto-review pickers share codexPick with codexSidePick, and every Codex row's button comes from condButton. The new route is named for the CLI (settings_parity_test.go). agent-prefs and settings-general list the new row. - The row's tooltip and the Routing page's Suggestions story say where Codex turns them off. magpie's old story said "Suggested prompts", which the current app no longer shows; corrected in all five languages from the app's own locale files. Run (mote, at this head rebased on |
||
|
|
50f7a8e01f |
routing: a Smart row behind one renewing sooner says so; Smart says new conversations go there too
YsiCing on X: in Smart, every conversation went to one Codex account (pro,
74% of its week) while Business and team, both at 0%, said "已用 0% · 会话留在另一个账号" ("0% used · the conversation stays on another account").
That is what Smart is meant to do. It sends every request, new
conversations included, to the one account whose quota renews soonest, and
only Stays: Session or Strict spreads new conversations. But the row blamed
a kept conversation, and the Smart description said "one account at a time"
without saying that covers new conversations, plus "at 90%", which is wrong
for a week since
|
||
|
|
c38753a7ee |
search: Settings can ask every search API at once, results merged (heyiwei5 on X)
The search APIs are asked in order: the next only when one fails or
finds nothing. Asking several together, with their pages merged and
repeats dropped, has existed since #2845 but only through
`magpie search mix`. Settings › Models › Web search now has an Advanced
fold, shown with two or more search APIs on, holding "Ask the search
APIs: In order | All at once". All at once marks every API on as mix
(POST /api/settings/search-api {"mix":[...]}, provider.MixSearchAPIs);
In order clears the marks. In order stays the default. A mix of some of
the APIs, set from the CLI, opens the fold with neither choice on and
names the APIs it asks.
Run (mote, at this tree):
- go test ./internal/gui -count=1: ok.
- TestSearchAPIsMixedFromSettings at origin/main's api.go: build fails
(searchAPIJSON has no Mix), so it is red on the old code.
- node --test search-mix, search-count, search-api, i18n-keys:
72/72 pass, chromium and webkit, en/zh/zh-TW/ja/de, 1100 and 560px.
- search-mix.test.cjs at origin/main's assets: 0 of 30 pass (red).
- gofmt -l: clean.
- After rebasing on
|
||
|
|
b34243823e |
routing: accounts' resets stay in their column, and resizing over many accounts is smooth (lexrus on X)
lexrus on X: on Routing's Accounts and keys, at some widths "resets in
3h" ran over the next column and the right column's words were cut, and
with many accounts dragging the window's edge was janky.
Overlap: the window parts' widths (--wk/--wv/--wr) were taken from the
widest window of the whole list, so one provider's long reset pushed
every row past its column. They are now per provider, and CSS caps each
part to its row.
Jank: the list was CSS columns, and the browser balanced every row again
on each layout. packActs (plugins/routing/client.js) places each
provider's box (and a long box's rows) itself under .rt-acts.packed with
--px/--py: down a column and on into the next, ends as level as a binary
search on the cap allows, a heading never last in a column. It runs on
the window's resize, on render, and a frame after a box's height changes.
Side mode (min1150, beside the requests) is unchanged: one scrolled
column, nothing placed. Measured on mote with a 100-row fixture, per
resize step: WebKit layout 26.6ms -> 5.9ms, frame p90 35 -> 18ms;
Chromium layout 8.24ms -> 2.86ms.
Test: routing-account-windows-fit.test.cjs, 4 and 20 Codex accounts, en
and zh, Chromium and WebKit, widths 420-1600: no window part runs past
or is cut, a provider's lines start together, the list isn't CSS
columns, boxes sit inside the list in column order without overlapping,
2+ columns at 700-1099. Broken by hand: the old assets are red on the
overlap; packing turned off is red ("the list isn't CSS columns").
gui-shell.md says how the columns are placed.
Run on mote at this change on origin/main
|
||
|
|
64c4261582 |
sessions: search what was said in every agent's sessions, from the page and an MCP server
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
|
||
|
|
103eff4d44 |
routing: a group's model is dragged by its row, not only by its number (NovaStudiosss on X)
NovaStudiosss on X: "the models added to a routing group should be draggable with the mouse; I move them often and Up/Down each time is not handy enough". A member could already be dragged since |
||
|
|
e47abdf468 |
usage: the allowances' trend takes any last N days; a curve's hover reads the exact numbers
shangyuan0818 on X asked for exact numbers on the Overview's quota curves when hovered, and for the trend to take any "last N days". - Usage → Overview, the allowances' "Trends: …" button: the menu now has 7 days and 30 days beside Off, 2 days and Cycle, and "Other number of days…", which turns the button into a field for 1 to 45 (the days of history magpie keeps). Enter or leaving the field keeps it; Escape leaves the range as it was; a number out of range says so and keeps the old one. A custom N stays in the menu, and is kept across a reload (magpie.quotaRange). - Hovering a quota curve shows a small tip at the reading nearest the pointer: when it was read, then each window's left to two decimals (70.46%), with a hairline at that time. A balance curve shows the balance in the card's currency. The curve's own tooltip (what the dashes mean) waits while the tip shows. A touch still zooms, as before. - The trend menu, the days field and the hover live in the usage plugin's page.js, so app.js stays inside its budget. - No animation: the tip follows the pointer, which a movement would lag. Run, at |
||
|
|
d597b4d010 |
usage: a priced cost without "≈", at least two decimals; cache hit rate to two
shangyuan0818 on X: Usage → Requests showed every cost as "≈$…", and the cache hit rate with one decimal. - A cost from known prices is what magpie counted, so "≈" is gone from every priced cost: Requests' Cost card and tiles, the agent, model and account rows, the quick panel's Usage, Routing's live rows. An estimate keeps it (a window's whole on an account card, a session file's times). - fmtCost gives at least two decimals ($1.00, $100.00, $2500.50), three under $1 as before, and a sub-mill amount to its first two digits ($0.00040, $0.000012) instead of $0.000. - Requests' Cache hit rate card has two decimals (93.97%); hitPct still never rounds up to 100% or down to 0%. - A whole-window estimate from $100 up stays whole ($1235): its cents would claim a precision it hasn't (wholeCost, moved to page.js to keep app.js inside its budget). Run, at |
||
|
|
47ce008da8 |
gui: Settings asks for HTTPS only while its rows can show (#6709)
renderHTTPS sent GET /api/settings/https on every renderSettings, and renderSettings has 35 callers, so each Settings draw cost a request, LAN or not. GUI tests count a request under /api/settings/ as a write, so checkin-now-account and panel-shortcut have been red in both engines and every language since |
||
|
|
d7cda856ad |
library: MCP servers turned off fold away below the ones on (hzlxb on X)
hzlxb on X asked for Library -> MCP servers to keep the servers turned off apart, folded, as Providers keeps the providers turned off. The list now holds the servers on. The ones off sit below it, above "+ Add server", under a "Servers turned off (N)" fold drawn with Providers' Turned off markup (row-head off-head, .fold with the chevron, the count in .note). It is folded at first and remembered in localStorage magpie.offServersOpen, as magpie.offProvidersOpen is. A server switched off moves under the fold, and one switched on comes back up. While picking (Select) the fold is held open and disabled, so every server picked is in sight, as Providers holds its fold open while searching. The MCP tab has no filter of its own, so there is nothing else for it to hide from. With every server off only the fold shows. With none off there is no fold. Strings are in en, zh, zh-TW, ja and de. Run: - library-mcp-off-fold.test.cjs (new): Chromium and WebKit, 1100 and 420 wide, en/zh/zh-TW/ja/de. It checks order, label, count, title, aria-expanded, that opening by a wheel-scrolled click leaves the head where it is and opens no editor, the reload memory, moving on a switch, picking, all off and none off. It is red on the old library files (no fold; checked on mica in chromium). - Library/MCP/i18n/click-scroll/providers-off-fold GUI files (102 files, both engines) on mote at the pre-rebase head 29a5f10f9: 2304 of 2310 pass. The 6 reds are library-open-again's 1100px cases, red the same alone on the old tree (filed as #6751). - go test -count=1 ./internal/gui/ on mica at this head: ok (143s). gofmt clean. - The whole GUI suite on mote at 29a5f10f9, in two parts (mote rebooted mid-run; the rest ran after it came back, under suite.lock). Part 1: 411 not ok in 75 files. Part 2 (640 files): 11355 tests, 10911 pass, 444 fail. No red is in the files this change touches except library-open-again (#6751). Every red file has an open issue saying it is red on main: skill-fold-all/skill-manual (#6667, #6668, the window's /api/update/using), skill-group-shared (#6687), view-open-wheel (#4723), view-trackpad-coast (#4724), view-wheel-unheard (#5158), usage-* (#6743, #4263), the rest in #6709 or by name; icon-tile was unfiled and is now #6759 (dim-color from |
||
|
|
923cc8747f |
routing: filtering groups reuses indexed lookups and cards (liu-kan, #6744)
Ported from liu-kan's routing_mod_filter branch at 5aca86598 (#6744). Typing in the Routing groups filter re-ran every member's lookups as a linear .find over all models, deciders, drawers and accounts, and redrew the whole page each keystroke. Now a lazy index (Maps built first-match like .find, splitMember and memberInfo cached, search text cached per group and locale) is rebuilt whenever `groups` is reassigned (it never is mutated in place) and dropped 5 minutes after both Routing pages are hidden. The filter's input redraws only the group list from cached cards, falling back to a full draw when groups or the locale changed. No look, matching or saved config change; no new strings; app.js untouched (client.js is outside the core budget). Measured (mote, Playwright, 4000 models, 20 groups x 20 members, 16 keystrokes, ms per keystroke incl. layout): chromium: before mean 4767.6 / median 5086.3, after 0.37 / 0.2 webkit: before mean 4813 / median 5075, after 0.88 / 1 Run: - go test -count=1 ./internal/gui/ on |
||
|
|
1f04ed2193 |
gui: a form's name and its control share a line in every editor
The owner (11-12, the second time): in a provider editor, Free for me and Redaction sat 4-5px under their ticks. "这个事情发生过不止一次了,要彻底避免。" Cause: each label carried a padding-top guessed for one control, 5px for a 29px input. Any other kind of control, such as a tick, a switch, the icon box, a row of options, a list or a JSON box, sat off its name. Fix, at the shared row layout instead of per row: - Every editor grid sets its rows on their first baseline: .editor, a dialog's .ebody, Advanced's .more .inner and Connect. The per-label padding and label.by-list are gone. - Controls with no text of their own carry a text line at their middle: the icon box (line-height 30px) and the library switch (a ZWSP ::before). - Exception: a row whose control starts with a text field is set at its top, its name padded to the field's line (--field-h, 44px on the narrow web). WebKit lays a baseline row out again on every layout and reveals a focused field each time, so the page jumped back to a new group's name (group-from-model-add). app.js's settleRows marks those rows .at-top (and a JSON box's name .by-json), only in grids a mutation touched. A CSS :has(+ ...) version held WebKit ~9s on Codex's editor (9209ms vs 249ms on base, provider-pass-errors). - Connect's options wrap at <=520px instead of scrolling: WebKit grew a baseline row holding a scroller 6px each time its bar came and went (connect-snippet-shell). - The rate-windows Add button sits at its row's top. - provider-at-once compares the label's text height, not its padded box. The label is still one line; a name beside a 44px field is padded down to its line. Guard: form-align.test.cjs opens the provider editors (a key's, Codex, with Advanced open), the group editors and Connect. For every name and control row it asserts the label's first text line and the control's first line share a vertical centre within 2px. It runs in chromium and webkit, en/zh/zh-TW/ja/de, at 1100, 420, a web 390 and a panel width. LESSONS.md gets the rule. Run (mica, through mica-run): - At the pushed tree (49274f690, the same tree before this message): form-align, provider-pass-errors, provider-at-once, provider-count-free, provider-unmasked, provider-rate-windows, provider-proxy, connect-snippet-shell, group-from-model-add, icon-url, library-mcp-hub, settings-lines-wrap, settings-update-proxy, editor-roomy and i18n-keys: 499 pass, 3 fail at load 75. The 3: settings-lines-wrap chromium de 440 is red the same on origin/main |
||
|
|
343920464f |
routing: Fast keeps the provider's extra-body Ultrafast; a relay's GPT model can go Ultrafast (KoiLx0 on X)
KoiLx0 on X: with Azure or another provider that takes service_tier
"ultrafast", the group's speed toggle stopped at Fast, and they asked
whether the group's Fast overwrites {"service_tier": "ultrafast"} put
in the provider's extra request body. Before this commit it did. A member
sent fast got service_tier "priority" in its body before the extra body
was merged. A non-forced extra-body field only fills in a missing value,
so "priority" went upstream. Only "!service_tier" survived.
Precedence now:
- Member not sent fast: as before. The agent's own tier is kept, and the
extra body's service_tier fills in when the agent sends none.
- Member sent Fast: priority. If the provider's extra body asks for
"ultrafast", it is sent ultrafast, so Fast is never sent slower than
the user asked of the provider. A slower extra-body tier (flex) gives
way to the toggle, which the user set on this member.
- Member sent Ultrafast: ultrafast.
- A forced "!service_tier" in the extra body still goes over all of
these as written.
The same holds for an agent's fast pick (same member loop).
Ultrafast on a provider the user added by its address (OwnFast): the
toggle goes on to Ultrafast for a GPT model when OpenAI offers the tier
on that model. That is known when one of Codex's accounts lists it, or
when Codex's own entry in models_cache.json for the slug does
(codexcat.OwnOffers). Codex itself is already offered the tier on such a
provider from that same entry (ownTiers). Like its Fast, Ultrafast is
only asked for. A provider that turns the field away is asked again
without it. Other vendors and OpenAI's own API are unchanged. The
Ultrafast button's tooltip on such a provider says the tier is asked of
the provider (new string in zh, zh-TW, ja, de).
Tests, red on the old code:
- TestFastMemberOwnProviderExtraTier: the outgoing body for each
combination of group speed and extra body, from Chat, Responses and
Anthropic agents. Old code sent "priority" for "fast + extra ultrafast"
and for "Ultrafast".
- TestCanUltraOwnProvider: old code returned false for a relay's
gpt-6.1-sol that Codex's entry offers Ultrafast on.
- group-member-fast.test.cjs: an own provider's member steps usual,
Fast, Ultrafast and saves ultra; one with no Ultrafast steps back to
usual. en/zh, Chromium and WebKit.
Docs: gateway-routing.md (a group member's speed) and
providers-accounts.md (Extra body) say the precedence and the
Ultrafast rule.
Run on mote at df2652f63 (base
|
||
|
|
b0d634b850 |
routing: Expand picks how far the stage opens, models or accounts (ipsikent on X)
ipsikent asked on X for a setting for how deep the Routing page opens:
often only which model a route uses matters, not which provider's account
it went to. Expand, at the end of the stage's top line, opens a menu
(openProtoMenu) with Automatic (as before: long lists folded, short ones
open), Models (two or more accounts or keys of one provider fold into the
row naming the model, and start folded) and Accounts (every fold starts
open). Models and Accounts open every group in the group. The pick is
kept in localStorage magpie.routingDepth; picking one forgets the stage's
remembered folds, so every row follows it at once, and a row clicked
after it is kept as before. Accounts and keys isn't changed. Display only:
the gateway's choice of seat is untouched.
It sits in the stage card's top line, not the page head: in the head it
pushed Hide accounts onto a second line at 420px in English. "Expand" is
in the core dictionary, since i18n-keys finds the word in plugged.go.
Run (mica, at this tree on
|
||
|
|
2e1c0a377b |
usage: a single-account card folds to its figures, and folded cards are one size (PILIHU2023 on X)
PILIHU2023 asked for a fold on each Usage → Overview card that leaves only the usage, with the cards all one height and width. - A card with one account (or one key) and figures to show (windows or a balance) now has a disclosure chevron at the end of its head, before its ⋯. It reuses the per-account fold (usageAcctFold, usageAccts in localStorage), so its state is kept across restarts and its titles are the existing ones. Folded, the card keeps its windows' names, bars and figures. It drops resets, curves, history, the reading line and the auto-reset and credits rows. A plan-only card (OpenCode Zen Free) has nothing to fold and gets no chevron. - Cards with several accounts keep their own folds: each account's chevron, and the All N accounts strip's. - Folded cards are packed to one height: the tallest folded single card. A card of several accounts, each in brief, takes whole rows of that height. A fully folded page is a grid of one width and one height. Open cards keep their natural height, so nothing is stretched or clipped (jen_celeus, #860). - app.js was at its budget with no room. The Usage packing block (packUsage and its helpers, about 3.8KB of code) moved from app.js to plugins/usage/page.js, which already holds the Usage page's card menus. app.js code is now about 3.2KB under its budget. No budget was raised. - The chevron's turn uses --ease-out (cubic-bezier(.23, 1, .32, 1)), .15s. What was run: - New usage-card-fold.test.cjs: Chromium and WebKit × en, zh, zh-TW, ja, de, at 1400, 900 and 400px and after a reload. It folds every card and checks they are one width and one height, sit on whole rows and don't overlap. It then unfolds two cards and checks they are their own height again. Red on origin/main |
||
|
|
ec1a1a7a55 |
library: import the slash commands the agents already have
miantiao_me on X (after v0.1.4189): 「之前在 Pi 定义的可以导入吗?」. Library ›
Slash commands now has a "Find in agents" card at the top. It reads the
command files each agent already has, from the same places magpie writes
them (Pi prompts/*.md, Claude commands/*.md, OpenCode command/ and
commands/, Gemini and Qwen .toml, Qwen .md, Droid), and lists them to
import, the way Subagents' import does.
- Parsing: frontmatter description plus body; for TOML, description and
prompt. Arguments go back to magpie's form: Claude's $ARGUMENTS[n] and
$n (0-based) become $n+1, Gemini/Qwen {{args}} becomes $ARGUMENTS,
Pi's $@ becomes $ARGUMENTS (${@:N} is left as written).
- Files magpie wrote itself are skipped. The same content in several
agents is one command; a name with different bodies per agent shows
"Differs by agent" and one of them is picked; a name the library has
with other content is "Name taken" and can't be picked.
- An imported command keeps its source agents ticked, and magpie adopts
each original file byte for byte (Command.Taken): sync writes the same
bytes at the same path, so the file is never doubled or rewritten.
After an edit the agent gets magpie's render at that path; a rename
drops Taken. Taken never leaves the machine (Collect strips it, Put
keeps the local one).
- API: POST /api/library/commands/probe, and commands/import through
the library change route. internal/cli's parity test names the probe
as stage 3, like subagents/probe.
- Docs: docs/subsystems/library.md has the new row.
Run at 039e25752 (on origin/main
|
||
|
|
028b07b4bd |
routing: a folded fold of accounts on one plan shows its bar in the app (Sdsi134a on X)
Sdsi134a on X: on the Routing stage, "Command Code Plan · 3 accounts" folded said only "3 available", with no quota, though the accounts are on one plan. foldQuota ( |
||
|
|
f362d3b9af |
routing: Hide plans folds the groups' quota lines, kept across restarts
Sdsi134a on X: each routing group listed every provider's quota line
("WorkBuddy AI, 4 accounts: …"), so with many plans and accounts the
groups page grew long. The page's toolbar has Hide plans, before
Templates: it folds those lines under every group (name, id chip and the
members' line stay) and then reads Show plans. The choice is kept in
localStorage (magpie.routingGroupPlans), as the Routing page's other view
choices are, so it holds across restarts. Shown by default, as before;
the button is only there when a group has such a line.
Run at b694f760c (this commit on origin/main
|
||
|
|
5bd41301b9 |
warm-up: All accounts warms every account in use at one press (CoderMaurice on X)
CoderMaurice on X: with several Claude accounts, Warm up now had to be
pressed once per account. With two or more accounts, the Warm up… menu on
the Warm up now row (a Claude Code or Codex provider's editor, the warm-up
section) now starts with All accounts. It sends POST /api/warm-all, and
provider.WarmAll sends Warm up now to every account that is in use (the
one the agent is on, or one turned on beside it) and whose windows aren't
all running already, going by the cached readings the Usage page shares.
It runs three at a time. An account that is turned off or paused, or
already in its windows, is sent nothing. An account whose sign-in lapsed
is sent nothing and is listed as failed, as Warm up now treats it. The
row's line lists the accounts warmed, the ones already in a window, and
each refusal with its reason (in red).
Accounts that are turned off aren't listed. A gateway rest is not read
(the provider package can't see it). An account rested for a used-up
window is still inside that window, so it is skipped as running.
"All accounts" moves from the usage plugin's i18n.js into core i18n.js,
since the core uses it now. It and two new strings are in zh, zh-TW, ja
and de. app.js stays inside its budget: the single-account and
all-accounts results now go through one formatter.
Run at a1968a0b5 (rebased on origin/main
|
||
|
|
6256d9956a |
gateway keys: a limit can follow a subscription account's own window (ljayic on X)
A key's limit gains the period "account": it names one subscription
account ("<provider>/<user>") and one of its windows (5h, Weekly, Monthly,
...), and starts and resets when that account's window does, at the reset
time in the account's last good reading (quotas.json), never asked of the
vendor on the request's path (provider.AccountWindow).
When the window can't be read (no reading yet, no such window, or its reset
has passed with no reading since), the limit is "reset unknown": it is
neither reset nor lifted. It counts from the latest time the window can't
have begun before (the reset that passed, else when the limit was set), so
it counts at least the window's calls; a refused call gets Retry-After 300
and a 429 saying the window can't be read now, and the accounts are read
again in the background at most once a minute.
GUI: Gateway keys -> a key's limit -> Window -> "An account's window", then
an app-menu picker of the accounts' windows as read (GET
/api/caller-keys/account-windows); the row reads "$x / $y · 5h of
codex/...", and an unknown reset reads "resets with the account's window".
CLI: magpie gateway-key limit <id> account --account codex/me@example.com
--window 5h --tokens 2m. i18n zh, zh-TW, ja, de. reference.md and
gateway-routing.md say it, with the fallback.
Run (at this tree, base
|
||
|
|
93762f968a |
usage: small, idle clients fold into one Other row
WJaunita45604 on X: test runs leave dozens of randomly named clients of
~10K tokens each in the Usage page's Agents list, and the page crawls.
renderUsage draws every Agents row again at each refresh whose summary
changed, at ~0.1ms of DOM and layout a row: with 400 clients a redraw
took 30-54ms in Chromium and 45-66ms in WebKit, with 2000 136-178ms and
224-246ms (probe at 1200px, Bun/SiYuan/translate-web and N clients).
A client not hidden folds when it is past the 5 with the most tokens,
under 1% of the period's tokens, and either made no call in the last 3
days (the agent group's new `last`) or is past the top 20; two or more
fold, or none do. No setting. Other sits at the list's foot with the
folded groups' sums (usageSum), so totals stay exact, and opens with a
click, Enter or Space; open, it draws the folded rows with their own
actions 100 at a time (Show {n} more). Closed they aren't drawn at all:
with 400 or 2000 clients a redraw now fits one frame (~13-20ms in both
engines), as with none.
Run at
|
||
|
|
dd9cd59a17 |
routing: an account whose usage read failed says so, the reason on hover (X @iamforu_)
@iamforu_ on X: "antigravity-bridge在路由页面不显示额度". When a plugin's usage read fails (the bridge's agy read timing out or erroring), its Usage card holds an error and no windows. cardOf dropped such a card, so Routing's accounts list and stage said "what's left not known yet", with no reason, while the Usage page showed why. A row whose card says its read failed now says "Allowance unavailable — hover for why" (the line remote rows already use, translated in every language), with the card's error on hover: the list's status line title, and the stage row's tooltip. A card with windows keeps them; an account with no card at all stays "not known yet". A bridge-shaped probe plugin (two accounts through auth.set, aside windows, 8s reads) gave matching, error-free cards from fetchSubscriptionUsage, and the Routing page drew them in a group's accounts and on its stage, so successful bridge reads already showed; the gap was the failed read. The probe was not committed. Run (mica; mote's load was over its cores), at |
||
|
|
91d27452b7 |
library: slash commands, written into each agent's own command folder
miantiao_me on X asked for custom slash commands (prompt templates) kept
once in the Library and given to agents as skills are. Library → Slash
commands keeps a name, a description and a prompt where $ARGUMENTS is
every word typed after /name and $1, $2… the first, second… word. Each
ticked agent gets its own command file, in its own folder and shape
(internal/library/commands.go, from each agent's docs and source):
- Claude Code: <claude dir>/commands/<name>.md; $n becomes $ARGUMENTS[n-1]
(Claude counts from 0), a literal $0 is escaped.
- OpenCode: <config>/commands/<name>.md, as written.
- Pi: <agent dir>/prompts/<name>.md, as written.
- Gemini CLI: ~/.gemini/commands/<name>.toml, $ARGUMENTS is {{args}}.
- Qwen Code: <qwen home>/commands/<name>.md, {{args}}.
- Factory Droid: ~/.factory/commands/<name>.md, $ARGUMENTS.
- Gemini, Qwen and Droid have no $1…: a command using them is not written
for those agents, and the row and editor say so.
- Codex is listed greyed: it reads ~/.codex/prompts no more, its skills
took their place. WSL agents get none yet.
What magpie wrote is recorded per file with its hash (Applied.Commands),
through syncOwnFiles, now shared with subagents: a file the user changed,
or one by that name magpie didn't write, is never overwritten or removed;
one equal to magpie's bytes is adopted. Commands travel with backups and
WebDAV sync (Bundle.Commands; an older bundle keeps this computer's).
docs/subsystems/library.md has the row.
Run (mote was over its load, so mica, then mote at the end):
- At 4119054bb on origin/main
|
||
|
|
1cfa53b678 |
gui: a gateway key's management level is switched from its menu, under Advanced (#6307)
ljayic on X asked to give a key the management API without curl. A key's … menu has Advanced (after Rotate key) for keys that can hold the level: not the sharing key, a browser or read-only key, an issued or expiring key (the same set access.Update and adminOf accept). It opens the app's menu headed "Management API" with Off, From this computer and From any computer, ticked at the key's level, and posts /api/caller-keys/admin-key. A key that has a level says "Manages magpie" in its row, its title saying from where. Strings in zh, zh-TW, ja and de. gateway-card's menu list now names Model names (on main since before #6029) and Advanced, 8 items. Run (GUI, Playwright 1.62.0, both engines, en/zh/zh-TW/ja/de, 1100 and 420px): - gateway-key-admin (new), gateway-card, gateway-key-readonly, gateway-caller-keys: pass (mica). - key-page, i18n-keys, i18n-en-no-cjk: pass (mote, repo root). - gateway-key-admin with keys.js and i18n.js from HEAD: red 0/10 (waits for .key-admin on ops). - Whole gateway-*.test.cjs set, key-page, phone-connect-menu: the reds left are gateway-key-arrange at 420px, which is red without this change too (#6268), and gateway-card's 7 !== 6 on main (#6029), fixed here. Not tried: the real app with a second computer calling the API. |
||
|
|
221c91fae3 |
gui: the gateway card opens the chat page
The gateway card gets a "Chat page" button beside Restart gateway while the gateway runs. It opens <gateway>/deepseek-chat/ in the browser, or, in web mode, the public URL's chat page. Both buttons sit in one .gw-acts group, so a narrow card wraps them together, and Restart keeps its .gw-fix class (the takeover, pause and port-holder tests read the first .gw-fix). The label is translated in zh, zh-TW, ja and de. Run: gateway-chat-page.test.cjs in Chromium and WebKit, every language, at 1100 and 420 wide, on mica: ok. It is red without this change (no button). At |
||
|
|
2a6ab83d8a |
usage: each account of a provider's card is a card of its own; the ⋯ keeps its room
normalcoder_ on X (v0.1.4079, Usage > Overview): accounts inside a provider
card were told apart by a hairline only, and the card's ⋯ was drawn over
the end of the head ("Show the other accounts in brief" was hidden).
- renderQuotas puts each account of a card with several into a
.subscription-acct box (a provider's keys, a balance a line, stay
lines); quotaCardMenu looks through the box for the account's head.
- The head keeps 18px for the ⋯ whether it shows or not; where nothing
hovers, the ⋯ is always shown.
- Core budgets +57 (app.js) / +81 (core): renderQuotas draws every card,
so there is no page to move it to.
Run (mote, both engines):
- usage-card-menu-room.test.cjs: 20/20 here; red 20/20 on origin/main
|
||
|
|
1106a33a89 |
routing: every account row in Accounts and keys shows all its windows
zwm_vincent on X: with two subscription accounts, Accounts and keys showed one window per row, 5H on one and 7D on the other, so neither row said what was left in the other window or when it reset. A subscription account's row now has one line per window Usage read: the short name (5h, 7d), a small bar, what is used or left, and when it resets. Each part's column is as wide as the widest down the list (in ch, CJK counted double), so the names, bars, values and resets start at the same place on every row. Where a row is too narrow (the list in columns at a phone's width, under 215px) the bar is left out and the reset wraps under, alike on every row. The hover still has each window in full with the day and time it resets and when it was read. The single-figure status, the windows line and the bottom bar are not drawn for such a row; wallets and accounts with no windows keep their one line. Tests: routing-account-windows.test.cjs adds a second account whose binding window is the week and checks both rows show both windows with their bars (40%/12%), the hover text, every column's left (and the reset's right) equal across lines and rows, nothing cut, no sideways scroll; en, zh, zh-TW, ja, de at 1100px and 420px, Chromium and WebKit. routing-pooled-card and routing-read-allowances read the new lines. Run at this head, rebased on origin/main |
||
|
|
af62d3d646 |
routing: a try's answer in the caption is figures in fixed places
Puremilk_chun on X: the caption over the Routing stage told an answer
as one sentence ("Codex's own sign-in (gpt-6.1-sol) 以 high 推理强度
用 41 秒 完成回答 · 197.5k token · 35 秒 后出首字 · 40 token/秒 ·
请求缓存命中率 98%"). Its length and line breaks moved with every
value, so the reader had to find each one again.
The caption now lays the answer out as a grid: who answered, its model
and effort on top; under them the duration, tokens, first token, speed
and cache hit rate, each a value over its existing label ("Duration",
"Tokens", "First token", "Speed", "Cache"; no new strings). Five to a
line; three to a line where the stage is 720px or narrower (a byWidth
class, no container query, WebKit #1249). A figure the try doesn't tell
is a dash in its place, so the others keep theirs. The sentence stays
on hover and in the steps list below. The caption's min-height grew so
the next answer doesn't move the page.
Test: routing-answer-figures.test.cjs plays the reporter's request
(41 s, 197.5k, 35 s first token, 40 tok/s, 98%) then a shorter one
with no first token and no cache figure, and checks every part keeps
its x, its line and the caption its height, nothing is cut, the effort
sits on the account's line, no sideways scroll; en, zh, zh-TW, ja, de at
1100px and 420px, Chromium and WebKit.
Run at this head, rebased on origin/main
|
||
|
|
90efddabae |
gui: providers can be picked and removed together (eiyuuzaki2333 on X)
Many API providers added meant removing them one at a time. Select, by
the Providers search box (shown with two or more), puts a box on every
row as Routing's groups and Library's lists have it: a click on a row
picks it rather than open its editor, Shift picks the rows shown
between, and the bar's box picks every row shown. Remove asks once, in
the app's own dialog, with the count and every name, then posts
POST /api/providers/delete {ids}. That runs provider.Delete for each
id, as the editor's Remove does, inside one agent.Reseat, so agents
move once, to where they end up. One it can't remove comes back in
`unremoved` with why, stays picked and is named in the status; the call
is refused only when nothing was removed. Done or Escape ends picking.
The rows, bar and removal are in pvpick.js, imported when Select is
first clicked. The core grows 270 bytes (pvSel, the button's click and
two lines in renderProviders), and coreScriptBudget is raised by that
with the reason. "{name} wasn't removed: {error}" moves from Library's
words into core i18n.js, since core code says it now.
Run (rebased on origin/main
|
||
|
|
e6e0585bd3 |
antigravity: reword Hermes', OpenCode's, Codex CLI's and pi's identity lines, which Google refuses since 11-14 evening
Since about 18:43 on 11-14 Antigravity answers 429 "Resource has been exhausted" to a system instruction holding "You are Hermes Agent" (Hermes' current persona), "You are OpenCode", Codex CLI's "You are a coding agent running in the Codex CLI" or pi's "a coding assistant running inside pi", whatever quota is left (@ZhouYimingsjtu, @Lmohn39 on X). Hermes' earlier persona is still refused as "You're … created by", so it keeps its "built by". Tried on a real account (gemini-3-flash), each alone: Codex GPT-6's prompt, Claude Code, Gemini CLI, Qwen Code, Cline, Kilo, goose, Amp, Droid, Kimi, Aider and Cursor pass as written. agTurnedAway gains the four lines; agSaidAs rewords them "You're …" and "running within pi", the smallest change that passed 5/5 on the real account (gemini-3-flash: pi 1.5.0's full default prompt, both Hermes personas, OpenCode's first lines, Codex CLI's prompt; claude-sonnet-4-6: pi 5/5), through the antigravity plugin's cloak, which has the same lines (plugins a617ecfd, antigravity 0.1.16, agy-cli 0.1.48, antigravity-cloak 0.1.9). The refusal's hint names the agent: new OpenCode, Codex CLI and pi hints, Hermes' covers both personas, word for word the plugins' and the Routing page's (client.js HINTS, i18n zh/zh-TW/ja/de). Run (mica; mote was over its 18 cores): - go test ./internal/gateway -run 'Antigravity|Cloak|CodeAssist': ok - go test ./internal/gui: ok - GOOS=linux and GOOS=windows go vet -tags nogui ./internal/gateway ./internal/gui: ok - node --test i18n-keys, i18n-en-no-cjk, routing-ag-turned-away (both engines): 38 pass - gofmt -l: clean Broken by hand: with the pi and OpenCode lines out of agTurnedAway, TestAntigravityCloakRewordsEveryLineItTurnsAway and TestAntigravityHermesHint go red. Not run: the full go test ./... (mica had another session's full suite running, mote over load) and the whole GUI suite; the change is strings in four tables plus the hint switch. |
||
|
|
e0ed2c4d81 |
gateway: model ids without the provider can be listed alone, in place of provider/model
qQianye on X (v0.1.4094 in Docker, several WorkBuddy accounts): the
client on their computer lists every model as provider/model and they
want those hidden. The advice was the Agents page's model list, but
gateway mode (what the Docker image's web page runs as) has no Agents
page. Settings › Network and sharing › Model ids without the provider
was drawn there already, but only added bare ids beside the prefixed
ones, so the list got longer, not shorter.
The row is now Off / On / Only. Only (settings.BareModelIDsOnly,
POST /api/settings/bare-ids {"on":true,"only":true}) lists each bare id
in place of the first row it stands for (provider.OnlyBare) and leaves
the other rows it stands for out: the found group it reaches
(auto/glm-5.3) and every provider's row of that model it reaches. A row
the bare id doesn't reach (b/vendor/m9, whose bare id names provider
vendor), a held key's row whose bare id isn't listed for it, and other
groups keep their ids, so no model leaves the list. Requests by
provider/model are served as before; only /v1/models changes. Another
magpie's list is unchanged. Claude Code's discovery, which drops a bare
row it wouldn't keep because the full row is there, lists it by its
alias with Only (there is no full row). Off clears Only.
Run, at this commit (base
|
||
|
|
1ab2c39843 |
tray: the menu bar and panel leave out what Usage's Overview hides (onkashiko on X)
onkashiko on X: a quota hidden in the main window still showed from the menu bar. |
||
|
|
106a24b95e |
library: skills from GitHub and git update by themselves when switched on
0xYaCo on X: "skill 能自动化升级吗?". magpie already checked for skill updates by itself (every 12h, as the Skills tab opens), but each update waited for a click on Update. A new switch, Update by themselves, sits under the Skills list while a skill comes from GitHub or git (POST /api/library/skills/auto-update; `magpie library skill auto-update on|off`; library.json's autoUpdateSkills, this computer's own). It is off by default. When it is on, KeepSkillsCurrent (a gateway.WhileServing loop) runs AutoUpdateTick 2 minutes after start and then hourly. Every 12h that runs CheckSkills, then UpdateSomeSkills on the skills found at "update". So a skill changed here stays in Unupdated with its Update button, one removed upstream is only marked, and a replaced edited version goes to the backups, as with an update by hand. Updated names and a new error are logged. Run (WSL2 magpie-desktop, Go 1.26.8; mote was at load 167, mica's disk full), at ab637d3c4 (this change on |
||
|
|
a71aa25d22 |
routing: a session's Avg. speed says the wait for the first token is left out, and gives the speed with it counted
@verymoes on X (tweet 2121533934332985393): an opencode session over the Command Code plugin read "平均速率 142 token/秒" on Routing's By session row, while CC Switch read ≈77 tok/s for the same 26-27 requests and opencode's footer 76.7 tok/s, and asked whether magpie counts wrong. It doesn't; the three divide by different times. magpie's average is Σ answer tokens over Σ (end − first token) of the timed replies (decodeOf; for a reply that reasoned, its answer from its first text), so the wait for the first token is left out. CC Switch's "≈" is its estimate from the session log's timestamps, which it documents as counting the wait for the first token (src/components/usage/format.ts, docs/user-manual 4.4). opencode's footer is one turn, not the session, and counted from the request until #63321 (11-11) moved it to the first streamed token, with reasoning tokens added in. With a ~28K-token prompt each and short agent replies, the wait is about half of a request's time, which is the gap. Nothing in the measurement is wrong, so it isn't changed; the tooltip now says what it measures: - "the time from each reply's first token to its end; the wait for the first token, and replies without usable timing, are left out" in place of "total decode time; excludes waiting"; - a line with the same timed replies over their whole time, the wait and the reasoning counted ("Over each request's whole time ...: N tok/s"), the number a tool that times the whole request reads. In zh, zh-TW, ja and de. The Usage page's speeds and a row's own speed already say "from its first token to its end". routing-request-metrics checks the tooltip's wording and its whole-time number (4,000 tokens over 82 s, 49 tok/s, beside the 133 average) in en and zh, both engines. Run on mica at this tree (mote was over its 18 cores): - node --test, Chromium then WebKit: routing-request-metrics, reasoning-speed, routing-burst-speed, routing-speed-first, routing-row-floor-speed, routing-sessions, routing-by-key, routing-session-title, i18n-keys, gui-ja, gui-de, gui-zh-tw. Chromium 191/191; WebKit 101/102, the one red reasoning-speed's cut-off fetch (#1350), fixed in the commit before this. - Broken by hand: the test against the old client.js and i18n.js is red in all four (chromium/webkit × en/zh) at "the tooltip says the wait for the first token is left out". No Go code changed. Not tried with the reporter's data: their session isn't on this machine, and the owner's Command Code account answers 401. |
||
|
|
b592c1fde1 |
masking: the page counts each agent's requests looked over, nothing masked in them or not
eiyuuzaki2333 on X: the Gateway page showed Pi's calls, the Masking page records from dsh alone, and nothing said whether Pi's requests were masked. They were: a Pi turn goes through the same masking as every agent's, on each API Pi uses (chat completions, responses, messages), with no agent or protocol scoping. But a record is made only for a request masking changed (noteMasked: hits or held values), and the page's agents came from records alone, so an agent whose requests carried nothing to mask didn't appear at all, the same as one never masked. Now, while masking is on for a request (redactionWantedFor, a key's own switch included), the gateway counts it under its agent (maskrec.Checked): looked over, and whether masking changed something, or sent as written to a model the user set to go unmasked. The counts hold no text: a small checked-<day>.json beside the day's records, written over through temp and rename at most every 5 s, read back after a restart, pruned at 30 days with the records and removed by Clear records. /api/masking/summary returns them as checked. Counted where a turn's masking is decided: serve (every routed chat turn, plugins and groups included), Codex's own sign-in's /responses turn, and the native API passthroughs (nativeArk, nativeAny). Not counted: searches, images, video, embeddings, System One's decisions and Codex's compactions, which are not an agent's turn; they keep their records as before. The Masking page's card lists each agent under the flow: "Pi · 128 checked · none to mask · 3 sent as written". A click narrows the list to it; the agent picker lists checked agents too; and a list with no records says "128 requests from Pi checked, and none carried anything to mask" instead of "Nothing masked matches these filters". Strings in zh, zh-TW, ja and de. Run (code at this head; first at base |
||
|
|
01c3efc4f7 |
library: billion-context's compression markers can be switched off (@JamesYu32 on X)
@JamesYu32 asked for a switch that turns off the markers billion-context adds after it folds: compress.visibilityMarkers. In bili 0.1.213 (CONFIGURATION.md, dist/index.js) it is a boolean, true by default; true appends the 📦/❌ line after a compress, decompress, search_context or acp_status call and re-injects it into the rebuilt history, false drops both, and the tool calls still run. Some models imitate the markers. The billion-context tab's Advanced fold gets "Show compression markers", on unless the file says false. Off writes compress.visibilityMarkers: false through edit.PatchJSON (comments and every other key kept); on takes the key out, back to bili's default, rather than leaving a value magpie chose. A provider's or model's own compress.visibilityMarkers is the user's and is left as it is; a non-boolean value (which bili rejects) is not read as off. The running bili is asked to reload, as for the other settings. Under Advanced because it is rarely changed. Run (mote, at this tree on origin/main |
||
|
|
7ea1e6a4b3 |
usage: the tray panel and the TUI leave out what the Usage page hides
onkashiko on X: a provider whose allowance card was hidden in the main
window (Usage > Overview, "Hide from Overview") still showed in the menu
bar's panel. The panel's Allowances tab had only its own Arrange list
(panelUsageHidden) and read the full cards.
Now the panel leaves out a card whose cardHideKey is in usageCardsHidden
and the rows in usageWindowsHidden (withoutHiddenRows), as Overview does;
a menu bar cell's card still shows (panelPeek). A subscription whose
every card the page hides counts in the foot's "{n} hidden" and shows as
hidden in Arrange; Show there
also drops its keys from usageCardsHidden, since the panel follows the
page. All of it is panelPageCut in the Usage plugin's page.js, which every
window loads, so the core scripts get no bigger (TestCoreScriptBudget
unchanged). Hiding from the panel alone still leaves the page as it is. The
panel reads settings again each time it is shown (loadBack), so a hide or
unhide in the main window reaches it with no restart.
Siblings: magpie tui's Usage page leaves out the same cards and rows
(usageShown, read at every quota read). The menu bar's cells and tooltip
show only the cards picked in Settings, so they keep a hidden card as
before; routing, caps and counting are unchanged.
Run:
- panel-page-hidden.test.cjs (new): chromium + webkit, en/zh/zh-TW/ja/de,
10/10 green; red on the old app.js/panelarrange.js (cards still drawn).
- TestUsagePageLeavesOutWhatTheAppHides (new): green; red on the old
pages.go (balance, account and row still listed).
- GUI: the 128 files that read the panel, Usage or tray code, chromium +
webkit, every language, on mote: 17 files red, rerun alone at
concurrency 1 here 123/449 red and at origin/main
|
||
|
|
27c998aba0 |
usage: the tray panel's and Requests' costs follow each provider's currency
onkashiko on X: with Currency set to By provider, the menu bar panel still showed every cost in one currency; providers and models were not each in their own. drawLedColumns and drawLedRank (shared by the tray panel and the window's Requests tab) formatted every value with no provider, so fmtCost fell back to the Totals in currency. - usageapi.Ledger echoes the provider a page is filtered to (`provider`, omitempty). - app.js: ledProv(l, split, id) names the provider of a value: the ledger's filter, the row's provider (provider split), the provider part of a modelAt id, or for a model split the provider(s) that served it when they all share a currency. ledFormat/ledFormatLong take it, so the rank's values and sub-lines, the tooltip's rows and the axis (when one provider is picked) are in that provider's currency. Sums (the panel total, the tooltip total, a model served in two currencies) stay in the Totals in currency. - page.js: the Requests head and the cost head use the filter's provider; the heatmap tip too. Other fmtCost calls are sums or sessions with no provider and are unchanged. - core script budget +491 (1,269,040 -> 1,269,531): drawLedColumns and drawLedRank are drawn by the panel, so there is no lazy page to move this to; packed to the shortest form. - docs/subsystems/gui-shell.md says how By provider reaches the panel. Run: - At 065fb6a8b (rebased on |
||
|
|
71a806749d |
sessions: a paginated Codex rollout moves to a longer provider id by its row (@xMopf7RF on X)
@xMopf7RF on X (tweet 2121441393424113800): the Sessions page's Move refused an old Codex session with "rollout-2026-03-09T09-25-….jsonl.zst keeps its history by byte, and "magpie" is longer than the provider it names: Codex couldn't open it moved", and offered nothing else. Since |
||
|
|
a83fe23252 |
gui: a picked accent tints the chosen thumb too (CHENGJIAHEGOXIS on X)
「强调色是按照颜色走的,但是主题深色依然还是灰色」 and 「就是我截图的原来的 灰色,还是没变化」: after |
||
|
|
8ed2ae030c |
claudetui: an image goes into the interactive mode on Windows 10 as a long paste, not -p (ok123now on X, #5061)
ok123now (magpie v0.1.3901, Windows 10 LTSC 21H2, Claude Code 2.1.316,
Claude Desktop): text worked, one 64x64 PNG was a 502 every try, and the
client asked again without end.
Cause: the helper pastes an image as its file's path in bracketed-paste
marks. Windows 10's conhost (10.0.19041) drops the marks on the way in
(the reporter's lead; #5061 and #5205 measured it on 19044 and 19045),
so Claude Code got the path as typed words, the helper waited out
pasteWait and exited 1, and the gateway answered 502.
Fix:
- claudetui: Claude Code reads its console as VT input (mode 0x208, read
from a real claude.exe 2.1.316) and takes one read of over 800
characters as a paste with or without the marks ($X=800 in 2.1.316,
q6=800 in 2.1.281), a path with spaces after it as the image alone. On
Windows the path is sent padded with spaces to 900 characters, no
marks: over 800, and under the 1024-byte blocks the same conhost loses
of a longer write (#5205). Elsewhere it stays bracketed.
- If the interactive mode still doesn't take a message (an image, or a
block it can't paste), the helper ends the turn with an error result
beginning claudetui.Unpastable instead of exiting, the gateway asks it
once as claude -p with the image itself, and remembers that for 12
hours. A redo that can't run is a 400, not a 502, so no client loops.
- The reporter asked to keep images interactive: -p counts at about
twice the plan quota and has none of the interactive run's cache. The
-p reason (Routing chip, all four locales, and the log line) says so.
Run, at this head (rebased on
|
||
|
|
925bc7188b |
usage: the Requests card's up arrow opens what the bytes sent upstream were made of
theforeveriris (X, 2121408745616162998) saw 8169 requests send 8.6 GB up and 1.0 GB down and wanted to know why. About 1 MB a request is normal: every request sends the whole conversation again, with the system prompt and the tools' definitions. This shows it. Gateway: promptOf, which already parses the body off the request path, now also counts the bytes of the system prompt, the tool definitions and images in the body it read. upParts scales those to the wire bytes and puts them on Record.UpParts. Nothing new runs on the request path, and a body that isn't parsed stays "Not measured". Usage: a packed row keeps the mix in 255ths under flag rowUpParts (32768); the row stays 152 bytes. Totals gain up_calls, up_measured, up_system, up_tools and up_images, and Shares carry up_bytes and up_calls by agent and by model. settledCountVersion goes 4 -> 5, so settled days are counted again once on the next start. GUI (Usage -> Requests): the "↑ 8.6 GB" on the Requests card is a button that opens a "Sent upstream" card: the average per request, one sentence on why, a bar and legend for Conversation / Tool definitions / System prompt / Images / Not measured, and the top 8 agents and models with bytes sent and per request. The open state is kept; × closes it. A request's details get a "Made of" line. zh, zh-TW, ja, de strings. Entrance is 200ms ease-out, no movement under reduced motion. Run (mote, at this head on |
||
|
|
ed63a5be5e |
gui: a picked accent colours what is chosen (CHENGJIAHEGOXIS on X)
「选中任意强调色没反应」: picking an accent in Settings › General seemed
to do nothing. The token did apply. With the real server, in Chromium
and WebKit, under light, dark and system, with and without a background
image, --accent was set by lookCSS and kept. Neither the theme nor the
wallpaper overrode it. But nothing on Settings, the sidebar, the header
tabs or the panel's tabs used --accent: every chosen option is graphite,
var(--fg), by design. So the colour only showed in a few buttons
elsewhere.
The fix is a --mark token, the ink of what is chosen.
- It is var(--fg) by default, so magpie's own look is unchanged, like a
Mac's Graphite.
- accentVars sets it once the user picks an accent. It is moved toward
black (light) or white (dark) until it reads at 4.5:1 on the surfaces a
chosen option sits on: --pill-hover #e9e9ee, and the dark switch thumb
#4c4c52.
- It is used by .seg/.opt/.ptabs/.warm-tabs/.am-seg/.klf-tab/.day-chip/
.apptab .on, the header nav's chosen tab, the side-nav's open-page icon
and Settings icon, and Library's switches and radios. Each is the same
"chosen" role, so all of them follow the accent, not just one.
Tests:
- appearance_test.go's TestAccentReadable checks --mark's contrast on
each surface, in both themes.
- appearance-look.test.cjs adds 8 tests, in Chromium and WebKit, light
and dark:
- Settings' theme and bird options and the side-nav icon at 1200 with a
wallpaper set: graphite by default, the mark for #0d9488 and #db2777,
and back to graphite on Default.
- The header tabs at 900 and the panel's tabs at 380.
Run:
- gofmt clean. go vet ok on darwin, GOOS=linux -tags nogui and
GOOS=windows (at 75bdc85fe, the same change on an older main).
- At 6f5549b1f (this change on
|
||
|
|
57dc64ba12 |
usage: the Overview's lists rank by tokens, cost, calls or name (onducoder on X)
onducoder asked for a ranking of Usage › Overview's Agents, Models, Gateway keys and Accounts by what each used. Each list's heading now ends in a quiet pick (the order's name and a chevron) that opens the app menu: Tokens (the default, the server's order), Cost, Calls or Name. By tokens the list stays in the server's order (most tokens first, the cache left out) unless "with cache" is on, when the cache counts too; other orders fall back to tokens, then calls. By cost, a row with no price goes last; by name, a row with no name goes last. Each list keeps its own order in localStorage (magpie.usageSort), and a folded list hides its pick. The code is in the Usage plugin (page.js, its i18n.js); "Calls" is a core word, since other files say it. The core script doesn't grow (TestCoreScriptBudget passes). gateway-caller-keys and usage-accounts read the heading's .label, since the heading's text now includes the pick; mobile-web takes the picks out until BASE_REF has them. Run: usage-sort.test.cjs (new; chromium and webkit, en zh zh-TW ja de, 1100 and 420 wide). On mica, with the next two commits, these files at this head and at origin/main |
||
|
|
0b64846bf7 |
gateway: Antigravity's cloak says omp's RFC 2119 line as "key words", and finds every turned-away line in any white space
eric_li8983 (X, 11-14): oh-my-pi (omp) on Windows with an Antigravity
account got "Antigravity answered 429 to this system prompt" for omp's
first line, "RFC 2119 keywords: MUST, REQUIRED, SHOULD, RECOMMENDED, MAY,
OPTIONAL." (omp 18.20.0's system-prompt.md, advisor/system.md and
live-instructions.md all start with it, byte for byte).
The built-in Antigravity path didn't know the line at all, and matched
the other turned-away lines only with single spaces. On a real account
on 11-14, Google's check turned omp's line away wrapped with LF or CRLF,
indented, with a tab, two spaces or a no-break space, so a literal match
misses copies that are refused. Now:
- agTurnedAway has omp's line, and each line is matched in any case with
any run of white space between its words (agLineRe, agSpace: JavaScript's
\s, as the plugin matches), Codex's and Hermes' lines too.
- omp's line goes as "RFC 2119 key words: …" (RFC 2119's own term), its
white space as it was, rather than broken up by zero-width spaces: a
broken-up copy was still refused 1 to 3 times in 10 (U+200B, U+2060 or
a soft hyphen alike), "key words" 0 in 30 (plugin numbers below).
- A refusal of it gets its own hint (antigravityRFCHint, word for word the
plugin's RFC_HINT), shown on the Routing page (AG_RFC) in en, zh, zh-TW,
ja and de.
The plugin half is magpie-community/plugins 4170d0e8 (antigravity 0.1.11,
agy-cli 0.1.40, antigravity-cloak 0.1.6); the next commit raises the
mover min to it.
Real account (sandbox HOME, copy of the live Antigravity account,
gemini-3.8-flash, sequential, through the plugin's same rewrite): omp's
literal prompt 10/10, the full template 10/10, the line wrapped after
"REQUIRED," 10/10. Zero-width before it: 3, 1 and 5 bare 429s in 12 each.
Run at this tree (rebased on
|
||
|
|
4e770f733a |
library: subagents imported from a repository
CHENGJIAHEGOXIS on X asked for an easy way to install a repository of
subagents such as msitarzewski/agency-agents. Library → Subagents now
has a find line. It takes what the skill installer takes: owner/repo, a
GitHub or GitLab link to a repository, folder or file, any git address,
or a folder on this computer. It lists the subagents found, lets the
user tick all or some, and imports them as Library subagents for the
agents ticked.
- Fetching is the skill importer's: resolvePluginRoot's source handling
moved into fetchSourceRoot, which both use. tooBig still refuses a
whole repository that is too big and asks for the folder's link.
- A subagent is a Markdown file whose front matter has a description.
- Its name is the slug of `name`. In an `agents` or `droids` folder
with no `name`, it is the file's own name.
- The description is folded to one line of at most 1000 characters.
- The body is the prompt.
- Dropped: every other front-matter key (agency-agents' color, emoji
and vibe, and tools, model, author or anything else). A Codex TOML
role is not read. A skill's folder (one with SKILL.md) and .git,
.github and node_modules are skipped.
- Two files with one name: the shallower is taken, and the other is
listed as left out, with why. So is a file Subagent.check refuses.
- An imported subagent records its source and file (From) and a hash
of its description and prompt as imported (FromHash). Imported again,
a subagent from the same file is:
- have, when it is unchanged;
- update, when upstream changed and the library's copy still matches
FromHash (description and prompt replaced; agents, skills, servers
and model kept);
- edited, when the user changed it in magpie (left as it is).
- A name the library already uses for another subagent is never written
over: the import takes the next free name-N.
- A carried library carries From.
- The page has Select all, a filter past eight, a tag per state, the
files left out, and a summary of what was imported and updated.
i18n: zh, zh-TW, ja, de.
- The fixture is agency-agents' own files in
internal/library/testdata/agency-agents. No test reaches the network.
Run on 80ae5ba24, which is this change on
|