Files
magpie/internal/settings
yetone 3a30ac87c2 catalog, gui: a 1-hour cache write is 2× input for a Claude model only, any other's unset is its 5-minute price and isn't shown (PAMI on Discord)
v0.1.1032 counted a 1-hour cache write left out at 2× input for every
model, so gpt-6-astra priced 10,50,1,12.5 showed "$20 (1 hour) at 2×
input", a write OpenAI has no price for. OneHourFor gives a Claude model's
price, listed or given by the user, its 2× input; any other model's 1-hour
writes count at the 5-minute price, magpie model price shows only its cache
write, and the app shows the 1-hour box only for a Claude model or one
priced with one.
2026-10-05 22:55:30 +08:00
..
awake, gateway, gui: Settings › General › Keep awake while agents work keeps the computer from sleeping by itself while agents work through magpie (xiao_wang24004 on X) — the computer went to sleep in the middle of an agent's task. With the new setting on (off by default, this computer's own: KeepOwn), the magpie serving the gateway holds the system's idle sleep off while a request is in flight or a Claude Code turn waits on its tool results, and for ten minutes after the last request ended (an agent running a build or the tests between requests), looking every 5 s, and lets go once idle or turned off. On a Mac it runs caffeinate -i -w <magpie's pid> (PreventUserIdleSystemSleep, gone with magpie), on Windows SetThreadExecutionState(ES_CONTINUOUS|ES_SYSTEM_REQUIRED) from a thread of its own, on Linux systemd-inhibit --what=idle:sleep (Pdeathsig; said once in the log and nothing else where it is missing). The display may still turn off, and closing the lid still sleeps. en/zh/ja/de. Tested with a real DeepSeek account through magpie web --gateway in a sandbox HOME: a streamed request had caffeinate asserting on behalf of magpie's pid in pmset -g assertions, and turning the setting off through /api/settings released it within a tick. TestKeep (held once while busy and within the grace, let go past it, when off and when Keep ends; -race) and TestKeepAwakeKeptAndOwn are new; keep-awake.test.cjs (WebKit and Chromium, en and zh: off by default, On/Off post keepAwake, another setting's save keeps it, no scroll, no left border, shown on a browser's page) fails without the change; lightweight and click-scroll pass in WebKit. go vet, go build (darwin, GOOS=linux nogui, GOOS=windows) and go test -tags nogui ./... under a temp HOME pass.
2026-10-05 19:46:02 +08:00
tray: the menu bar shows several subscriptions' usage side by side (KevinXC on Discord) — Settings → Usage in the menu bar picked one card; its menu now ticks any number (kept open while ticking, saved once when it closes, Off unticks all, a ticked card that has gone stays listed to untick) and the pill says "3 subscriptions". settings.TrayUsages keeps them in order; a file with only the older trayUsage shows that one, and trayUsage is still written as the first for an older magpie. On the Mac the bird and a cell per card are drawn as one image by AppKit on the status item's button: the card's logo (a black glyph tinted in the menu bar's text colour, a coloured one as it is, the name's letter in a ring when there is none) and its two windows stacked, "42%" over "18%", in the bar's colour light or dark and sharp at any scale; the bird's flap goes through it. Arc flags run into numbers (Codex's logo) are spaced out for AppKit's SVG reader. A row longer than 10 characters (a plan's balance read from its page) is cut with an ellipsis in the bar and whole in the tooltip. Windows and Linux show the cards as text, " | " between them. TestTrayUsageCells, TestSVGArcFlags, TestTrayImage (darwin, renders 0-3 cards light and dark at 2x), TestTrayUsagesMigrate and tray-usages.test.cjs (Chromium, WebKit, en/zh) are new. go vet, go build (darwin GUI), go build -tags nogui (darwin, GOOS=linux), GOOS=windows go build, go test -tags nogui ./..., go test ./internal/gui pass; tray-usages, settings-groups, panel-*, click-scroll, old-webkit pass. Not seen in a live menu bar.
2026-09-30 19:45:44 +08:00