Give the .key status pill a fixed min-width and hidden overflow so its
left edge (and the green ::before dot) lands at the same x on every
provider row, instead of shifting with label length.
WorkBuddy (CodeBuddy Code's desktop app) keeps its signed-in session in
<shared data>/auth/workbuddy-desktop.info, plain JSON while credential
protection is off (its default); magpie reads that account, never writes
it, and skips it when the tokens are encrypted at rest. Further accounts
are signed in with WorkBuddy's own external-link flow (auth/state, then
auth/token polled until ready, then login/account) and kept in
logins.json. The plan is served OpenAI-compatibly at copilot.tencent.com
/v2 under the account's access token, with its id and domain in headers
(X-User-Id, X-Domain), exactly as WorkBuddy sends them; a near-expired
JWT is refreshed as WorkBuddy does, and a magpie-signed-in one's refresh
is written back beside it while WorkBuddy's own file is left untouched.
The models are its CLI agent's coding picks, and the credits come from
its resource summary as one window.
A card in Providers' subscription list signs in and shows the accounts;
the Provider is one of the account ids and joins the usage rollup.
* Fix segmented-control animation replay in settings
Scope the sliding-thumb cache to each control instead of sharing it across controls with identical options. Keep an existing thumb in place during rapid clicks so CSS continues its transition from the current position; a newly rendered control starts from its own last selection.
* Preserve thumb slide across control redraws
* cli: magpie webdav — WebDAV sync from the terminal, what Settings › WebDAV sync does, for a machine with no window (WSL, a server over SSH)
magpie webdav shows it; on <address> [user=…] [password=…] [keys=no] [agents=no] [library=no] turns it on and syncs at once, asking for the passphrase (and the password, when a user has none); set k=v… changes what is given and keeps the rest; now, dismiss and off are the page's Sync now, OK and Turn off. Through the same davsync.Configure, Now, Dismiss and Off.
A sync, Off and Dismiss hold a lock the system keeps on sync.lock (flock; LockFileEx on Windows): the gateway's sync every 3 minutes and one from a terminal — or from the app's window while magpie serve has the gateway — would each save sync-state.json over the other's. The system lets it go when the magpie holding it ends, however it ends.
Configure keeps the saved password only for the same server (scheme and host) and user: an address moved to another server, or another user, no longer takes it there — in the app too, where a new address with the password left empty was sent the old one.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* davsync, cli: from the review of #127 — the setup read again under the lock, Configure locked too, the password never an argument, one left behind asked for, a wait that runs out said in the status
Now reads the setup again once it has the lock: one that waited while another magpie turned sync off went on with the setup it had read, and saved sync-state.json back after the Off. Configure takes mu and the lock too, after a sync in progress.
magpie webdav takes neither the password nor the passphrase as an argument: password= asks for it, as passphrase= does.
Configure with the saved password left behind — another server or user, the password empty — says to type it and saves nothing, where the Settings page dropped it and the sync failed with 401 under a field that still said saved.
A wait for the lock that runs out is davsync.ErrBusy. Dismiss returns it, and the davsync routes put ErrBusy from a sync in the status they answer with, where the page shows a sync's failures; Save's own errors stay in its form, what was typed in it kept.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
* davsync, cli: the lock before mu, a wait bounded under the page's, one called off not called busy, the password rule in one place, a bare address with = in it
The lock comes before mu everywhere, so a wait for another magpie never holds mu, and Configure, Off and Dismiss wait for it 30 seconds at most, less than the Settings page gives a request: before, a request could hang on mu and then on the lock for minutes.
A wait for the lock called off, as when the page is closed or the gateway stops, is its context's error, not ErrBusy: nothing said another magpie was syncing.
What becomes of the saved password is decided in one place, davsync.SavedPassword, which Configure and magpie webdav both go by, where the two had rules of their own that had come apart: an account with a password and no user name, moved to another server, had its password dropped with nothing asked, and the sync failed with 401. It is asked for now, as for an account with a user.
magpie webdav takes a bare argument with :// in it as the address, = in it or not: https://host/dav?token=… was read as a field.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Cursor 的两个额度池和汇总值原先同时参与每个模型的路由计算,导致 Other Models 用尽时仍有额度的 Grok、Composer 和 Auto 也被判为用尽。按服务端名单及官方已确认的模型归属分别匹配额度池,汇总值仅用于展示,并统一额度名称。
路由用量按账号和模型分别保存,避免同一账号的不同模型覆盖用量及重置时间。补充额度池独立耗尽、模型别名、重置和路由排序的回归测试。