db87e014f2c53cdcf4c4e10c2d3cd41393ba3cb6
2771
Commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
92d2ed74f9 |
providers: an Ark key's Seedance models are under Video models in its editor, each to tick
axelburks on Discord: "供应商里方舟的配置页,有图像模型选项能勾选模型,但是没 有视频模型选项不能勾选视频模型". A Volcengine Ark key's editor listed its Seedream models under Image models, to tick, and had its Seedance models among the chat models or nowhere. Cause, two parts: - The editor had no video section at all: video models had no list and no hidden set (gateway-routing.md said "Video models aren't listed in the editor, so there is nothing to hide there"). - catalog's live parse read only "kind" and modalities.input/output. Ark's /api/v3/models marks no kind: it says domain "VideoGeneration" / "ImageGeneration" and modalities.input_modalities/output_modalities. So Seedance came back as a chat model, and 3D models (output 3d, no text) as chat models too. Change: - catalog: a live row with no kind is a video model when its domain is VideoGeneration or it outputs video without text, an image model for ImageGeneration or image without text; Ark's input_modalities / output_modalities are read when input/output aren't there, so a model that gives no text (Ark's 3D) is left out of the chat list. TestFetchArkMarksVideoModels runs on a captured Ark list (testdata/volcengine-ark-models-2026-11-03.json, fetched read-only with GET /api/v3/models, no key in it). - provider: HiddenVideomakers beside HiddenDrawers, VideomakerHidden. - gateway: VideomakersOf (Videomakers on a given list, for the editor), OfferedVideomakers = Videomakers less the unticked ones, read by AutoVideomaker, videomakerObjects (another magpie's list) and mediaModels(true) (generate_video). A hidden one still makes its video when named: bareVideomaker, videosCreate and arkFilms read Videomakers. - gui: the editor's Video models section (renderVideomakers), filmIds and hiddenVideomakers on /api/providers, kept on save as hiddenDrawers is; i18n for every language. app.js comments cut to stay under TestCoreScriptBudget, which this change reached; no raise. - docs: gateway-routing.md's Hidden image models section. Old data: an Ark list fetched before keeps Seedance among its chat models until its list is fetched again; customVideomakers already counts any Seedance id an Ark key lists or picks as a video model, so it makes videos and shows under Video models now. Run on mote, this change and the next (/v1/models ?kind=, gateway and docs only) rebased on f4c664a09; this commit's own tree, on |
||
|
|
d1cdce1302 |
provider: the group alone keeps subscription models out of agents' lists (shaoyang.)
shaoyang. on Discord (#general, 11-03): with a routing group's Model lists set to the group alone (its card's 成员模型不单独列出), the model list fetched still had every model of the group. Cause: |
||
|
|
00098f12bf |
library: Magpie Browser's "which agents may use it" is a line of its own under its row
tao0194 on Discord (v0.1.2828, zh, panel-width window): in Library > MCP servers the magpie-browser row showed the connected ask (green dot, the question, a button per agent) inside the name's column, wrapped into a narrow strip between the command and the row's Scope and agent chips, three lines tall beside every other server's two. browserAsk's element was appended to the row's .who. It is now the row's own child: the row gets lib-asking while it shows, wraps, and the ask takes a line under the name, command and chips, from the name's left edge (the picture plus the row's gap, 37px, 38px in the window's rows) to the row's right edge. The first line keeps the name, command and chips as the other rows have them (.who flex-basis 0 above 560px). At 560px and under, where rows already wrap, a long command now ellipsizes beside the row's picture instead of taking the name to a line of its own under it; that was so for any server with a long command, and the ask's left edge follows the name. docs/subsystems/library.md says where the ask sits. library-browser-ask.test.cjs now has three agents (Codex, Zed among them) and a context7 row beside it, runs at 1100, 600, the panel's 440 and 360, and checks the ask starts under the first line, at the name's left edge, reaches the chips' right edge, that the first line is as tall as another server's, and that the name sits beside the picture. Run (mote, Playwright 1.62.0, Chromium and WebKit, en/zh/zh-TW/ja/de): - library-browser-ask.test.cjs on the old client.js/library.css: 42 of 44 red (every layout subtest; the two not-connected/given ones pass). With the change: 44 of 44 green. - The 84 GUI files that open the Library, name lib-row/lib-server or library.css, or check budgets and i18n keys: 1480 of 1480 ok, before the rebase onto |
||
|
|
f4c664a09c |
plugin, gui: magpie web ends its plugin hosts, waited for, before it runs the new version (#3285)
The second way acezan's 57 <defunct> magpie-bun (v0.1.2819, a Linux systemd service, 47 hours) pile up: magpie web's restart to update (AutoRestart) runs the new version with syscall.Exec in the same pid. The running plugin host was the old image's child, and the old image's host.read held the only Wait for it. After the exec nothing waits for it, so it ends on stdin EOF and stays <defunct> under that pid, one per restart to update. skygunner reproduced it and AAEE86 counted 22 zombies for 23 images under one pid (#3285). With about a hundred releases a day, an AutoRestart service makes about one a hour, as acezan's did. - plugin.EndHosts (host.go) stops every host started and not yet reaped, including the retiring ones, waits until each one has been waited for, and refuses to start another (errHostsEnded). startOn starts the host and records it under one lock (live), so a host that starts during EndHosts isn't missed. - Web.Wait calls it right before update.Reexec. Run at 72bc741ef (on origin/main |
||
|
|
0acba61a35 |
gui: a lone plugin's check-in tab is named for it, not "Plugins"
ljq906416 and justrun_way on X couldn't find WorkBuddy's daily check-in after it moved to its plugin. The WorkBuddy plugin (0.2.0 on) checks in itself, so magpie hides its own WorkBuddy tab under Settings › Usage's check-in tabs and the switch sits under a tab labelled "Plugins" (插件), which nobody looking for WorkBuddy reads. With one plugin checking in, the tab now carries that plugin's name (WorkBuddy), as a built-in's tab does; two or more still share "Plugins". The label is set through data-en, so a language change keeps it. Run (wsl-run, Linux, Chromium + WebKit, en/zh/zh-TW/ja/de): plugin-checkin, checkin-reason, checkin-reason-once and i18n-keys: 64 pass, 0 fail. The new two-plugin test checks the shared tab's translated name and both rows; the 440px test checks the lone tab reads "FakeCo". Broken by hand: with the old app.js the 440px test fails in chromium en and zh (expected FakeCo, read "Plugins"); the two-plugin test passes there, as it guards the shared case. Size budgets summed by hand the way TestCoreScriptBudget does (the Go package needs cgo, which wsl lacks): app.js 1,308,499 of 1,316,874, core 1,529,963 of 1,533,802, no raise. Not tried: the real app with a signed-in WorkBuddy plugin. |
||
|
|
9019ca88d6 |
gui: Scroll to top and Scroll to bottom move when the page under them changes, not only on a scroll (Jiabubu)
Jiabubu on Discord: with the capsule in sight, a click that opened a
Routing group left it over the editor's member rows (Remove beside Up
and Down) and its held Cancel and Add, and it moved off them only once
the page was scrolled.
scrollends.js placed the capsule on a scroll, a resize, focus or the
pointer leaving it, and a hidden attribute set anywhere. Opening a group
in place sets none, unless something else on the page happened to be
hidden again in the same draw (an empty pool list is, on every draw,
which is why the earlier tests saw it move). It now also watches the
open page and each of its own children with a ResizeObserver, and the
page's child list, so any change of size under it (a group opened or
closed, rows added or taken out) places it again on the next frame: it
rises above a held foot, steps aside at the page's foot, or comes back.
One file serves every page with the capsule (Agents, Providers, Routing,
Library, Settings, plugin pages), so they all take it. No core script
changed; scrollends.js loads lazily and has no budget.
view-ends-relayout.test.cjs: with no scroll after the change, the capsule
must be where the reader's next scroll puts it, and over nothing of the
editor's:
- Routing, 16 groups of the reporter's rows ("低-ultra", 922K), a pool in
the list: a screen down, a click on the card lowest in sight opens its
editor; then Cancel closes it.
- Agents, 40 rows: a little above the foot, a block at the list's end
taken out so the foot comes up under the capsule.
Desktop 1100, 700, 560; browser page 1100, 440, 360; Chromium and WebKit,
en/zh/zh-TW/ja/de.
Run on mote (mote-run) at this tree:
- view-ends-relayout, both engines, every language: 10 of 10 ok.
- On
|
||
|
|
900ae0fa51 |
backup, sync: sign-ins go too when picked, sealed, never over a later renewal
qianxunji (#feedback) and curtinp118 on Discord: a VPS restored from a backup, or a new computer joining sync, had to sign in to every subscription again. Sign-ins (subscription accounts in logins.json, Codex's auth.json, plugins' sign-ins in plugin-auth.json) can now go too, in each place only when picked; all are off by default, so an upgrade carries nothing new. - Sync (WebDAV, S3, GitHub): a "Sign-ins" tick in the form, with a line saying anyone with the passphrase and the server's file can use the accounts, and that an account on two computers can be signed out on one when the other renews it. CLI: `magpie webdav|s3|github set sign-ins=yes`. - Export: "With the sign-ins", off; ticked, the passphrase hint says the file holds them. CLI: `magpie backup --sign-ins`. - Import: "Bring in the sign-ins too, when the file has them", on. CLI: `magpie restore --no-sign-ins` leaves them out. - Back up by itself: "Sign-ins in backups", Off/On. On asks for a passphrase (twice) that seals the sign-ins alone (the rest of an automatic backup stays unsealed, as before); it is kept in autobackup.json (0600), never sent in the view. A backup whose sign-ins another passphrase sealed restores without them and says so. What goes (provider.CollectSignIns, plugin.CarriedAuth): magpie's own copies only, not an agent's own account, an agent-home row, a hidden or plugin: row, or a retired built-in. Each record is keyed by agent + email + org (or the account key); ids two rows share go on neither side. Restore/import (RestoreSignIns) adds what is missing and updates only when the incoming copy was renewed later; nothing here is removed. Before writing over a row it counts every row that could be the same account (same login, same refresh token, same id): none adds, several keeps all, one is kept when it isn't magpie's own copy, is held, or is the agent's live account. Codex's auth.json is written temp-and-rename, 0600, only where Codex is signed out. Sync merges per record against the last sync's hashes (MergeSignIns): the later renewal wins; a removal crosses only when the other side still had it as of the last sync; ApplySignIns re-checks each row's hash before writing so a renewal in between is kept. A computer with the tick off sends none, so others remove nothing for it; turning it off, a Restore, or a replaced server file clears the last-sync record. Export's and Import's forms moved out of app.js into syncfiles.js, imported when one opens (as autobackup.js is), so the core is 3.2KB under its budget with no raise (app.js 3.2KB smaller than before). docs/subsystems/sync-backup.md has a "Sign-ins, when picked" section; subscription_signin_test.go's header now says it pins the default. Run at the pushed head (678d28cba on origin/main |
||
|
|
5ee5274bd9 |
quotas: a remote magpie's Codex reset is used from its card here (#3850)
prgrmrwy runs magpie on a home server and uses it from work through a remote magpie (and DSH). The remote Codex card said "1 reset", but the reset could only be used from the GUI of the computer that holds the sign-in. What changed: - Gateway: POST /v1/magpie/quotas/codex-reset?user=<email>[&credit=<id>] (Server.codexReset) spends one of that account's resets with provider.SpendCodexReset. That is the Usage page's own code (UseCodexResetCard, then AwaitAllowance), moved out of internal/gui/usage.go so both use it. A reset can't be undone, so the route needs an enabled gateway key with full access, from loopback too. No key gets 401, and that covers every corsGuard exemption that has no key: Origin null, app schemes, *.localhost and a missing Origin. A read-only key gets 403 gateway_key_read_only (readOnlyGuard, which readOnlyRefused now lists, and again in the handler). A held key gets 403 gateway_key_held, even one told quotas. The account must be named (400 otherwise). One ask runs per account at a time (409). When the reset is used, that card is read again. - Remote client: UseRemoteCodexReset (remote_quotas.go) asks the remote with the provider's key. remoteJSON's status mapping is shared through remoteBody. A read-only key there is told as such, and a 404 as a remote too old. With no answer in time it says the reset may have been used, and it never asks again by itself. A remote Codex card now keeps its Resets; a GLM team's (byWindow) and every check-in are still dropped. - GUI: "Use a reset" / "Use one..." show on a remote Codex card (codexResetCard). They open the same in-app confirmation sheet, with a line saying which computer's magpie uses it, and send the card's provider to /api/usage/codex-reset. The remote's errors are put in the user's words. New strings are in all 5 languages. - DSH: no code here. Its provider plugin reads /v1/magpie/quotas/cards and can call the new route with a full key. - resetOutcome (a reset's result in words) moved from app.js into resetask.js, the only place that says it, so the core's scripts stay in TestCoreScriptBudget's 1,533,802 with no raise (1,533,003 after; origin/main |
||
|
|
69167bc299 |
usage: a reply let go under a second after a wait four times longer tells no speed
pluviophile714 on Discord: a gpt-6.1-sol row on Routing read 1,539 tok/s (input 21,617, output 392, first token 8.2 s, total 8.3 s), where another monitor measures ~70. The reply came whole about 255 ms after an 8.2 s wait. Its content was spread over that short window (flow 230 ms), so the HeldShare flow check passed, and so did the 100 ms floor, and 392/0.255 s read as 1,539 tok/s. New rule, usage.HeldWindowMs: a window under 1,000 ms whose start (first token, first text or first reasoning) is more than HeldShare (4) times the window tells no speed. One rule in every place that computes one: - usage.DecodeOf: the Usage page's speed and totals, the CLI, the GUI's model speeds, and the gateway's Speed first pacing (noteTrySpeed); - routing/client.js decodeOf: the Routing row's speed and its story line; - usage/page.js ledDecode, plus a ledNoSpeed_ reason for the dash's tooltip, in en, zh, zh-TW, ja and de. docs/reference.md and docs/subsystems/gateway-sessions.md say so. On the owner's usage.jsonl (read only), 103 of the 106 rows over 600 tok/s were such windows (e.g. 448 tokens in 107 ms after 8.1 s) and are dropped. The 3 that stay have windows of 2 to 5 s. The overall speed goes from 103.8 to 97.9 tok/s. What it costs: a short reply that really streamed after a long wait tells no speed either. The live visible-reasoning fixture (76 tokens over 731 ms after 6.8 s, ~104 tok/s) and #2637's grok record (307 tokens 403 ms after a 4.6 s first token, 531 tok/s) now read "—". Their tests keep their guarantees with the same timings after a short wait, and also check the long-wait case. Tests: - New: internal/usage TestShortWindowAfterLongWaitTellsNoSpeed (the reporter's numbers, a reasoned row from the ledger, the boundary, a second after a long wait, Totals) and internal/gateway TestShortWindowAfterLongWaitNotesNoPace. - GUI: usage-speed-every-row has the reporter's row (dash, and the tooltip in all five languages); routing-burst-speed has it (first token 8.2 s, no tok/s). - Updated to the new rule: TestVisibleReasoningSpeed's decode-minimum and max-speed cases (short wait now), TestCodexTurnMeasured...'s gateway/Claude rows, TestLiveVisibleReasoningFixture and TestUsageIngestTellsSpeed. Run on mote at this tree (rebased on |
||
|
|
d10f377657 |
providers: Names & levels is Names, prices & levels, where a model's own price at one provider is set (ferock4669)
ferock4669 asked on Discord whether magpie has a screen to price each model, since one model can cost differently on each provider. It has: each row in a provider's per-model list has a price box (input, output, cache read, cache write, 1h cache write, long-context tier, $ / 1M tokens), saved in settings' ModelPrices under pid/model. It wins over the list price in Usage (usage.Pricer through provider.BasePriceIn) and in a key's spend cap (usage.KeySpent through NewCoster). Nothing has to be built; the button opening it said only "Names & levels", so nobody finds a price there. What changed: - The button, its panel's heading and fold, and every note that sends the user there say "Names, prices & levels" (zh 名称、价格与推理档位, zh-TW 名稱、價格與推理檔位, ja 名前・価格・推論レベル, de "Namen, Preise & Stufen"); the gateway's vision and compaction notes, the provider package's text, the subsystem pages and the site's start docs (en, zh, ja) follow. - The button's tooltip says it sets what each model costs at this provider; Usage's "estimated" tooltip says where a provider's own price is set and that it counts over the list price. Both in en, zh, zh-TW, ja and de. - Not changed: the Codex model description text in internal/codexcat (it goes to Codex, so a vendor sees it) and core_budget_test's history comment. - app.js: a comment above the price box is shortened so the core script stays under its budget, not raised (app.js 116 bytes under origin/main). Run at the pushed head (rebased on origin/main |
||
|
|
1af868a153 |
provider: a Codex app left on a used-up account restarts with Restart the app off too (atom0964)
v0.1.2826 ( |
||
|
|
219b60f494 |
accounts: the first account of a gateway-served subscription ticks off (Rime_Nan on X)
Rime_Nan on X: in WorkBuddy's account list the first account (First) couldn't be ticked off; it took dragging another account above it first. For a subscription the gateway serves itself (plugins, Copilot, ChatGPT API, Gemini, Antigravity), First is only the order the gateway tries accounts in; no agent is signed in to it. setSideLoginOn still refused it ("put another account first"), and the GUI drew its tick fixed.
Now, unticking the first account hands First to the next ticked account that hasn't lapsed and turns this one off. If no other account is ticked, it is still refused, with "tick another to stop using it", and the GUI's fixed tick says the same. An account the user left off is never ticked on. Claude and Codex (pausable) are unchanged.
To keep the core scripts in their budget without raising it, the bytes were paid for by cutting renderAccounts' comment to one line: app.js is +20 bytes, under 1,533,802.
TestCopilotAccounts asserted the old refusal; it now checks the handover and that the only account in use still can't be ticked off.
Run (mote, macOS 27, at f9dda0d3e on origin/main
|
||
|
|
f0e0385a0e |
routing: a row's model chip is whole; its status is what is cut short (yi_time)
yi_time on Discord (#feedback): on the Routing page, a group member's
row that was answering showed its model chip cut to "gpt-6.1-te…".
The status after it ("回答中… · 按意图"任务主要依靠视觉或界面…")
took up to 60% of the row (fit-content(60%)), and the head, with the
account, plan and model as one inline run, was cut at its end, which
is the model. So which model answered didn't show. The same happened
in a fold of keys, whose status column was auto, and at narrow widths,
where a long account name pushed the chip off.
The head's column is now as wide as its content (minmax(0,
max-content)). The status takes the rest and keeps at least
min(14em, 40%), cut short with an ellipsis. Inside the head, the
account name, then the plan, give up room. The chip and its
fast/fallback tags never shrink. Folds get the same columns, and their
status still wraps. A status beside the name is right-aligned, as
before. Under the name (max460/max560) it starts at the left. A status
cut short is read whole on hover: its em gets a title when the pointer
finds it overflowing. Measured on pointerenter, not each render
(#3164). Resting rows keep their rest tooltip; the intent and session
titles are as before. Sibling of
|
||
|
|
1dead5dc7b |
provider: magpie's own Codex account switches leave the Codex app running unless Restart the app is ticked (atom0964)
atom0964 on Discord (#help) has two ChatGPT Plus accounts in magpie, with Codex always signed in to the first and Only switch Codex's sign-in both off, on Smart routing. The Codex desktop app kept restarting by itself. They tried several combinations of the ticks and it still did. Why: with both off, SwitchWhenSpent signs Codex in to the next account at 98% and back to the first below 90%. Each switch was noted for the Codex app (codexAppSpentSwitch), and KeepCodexAppOnItsProvider ended its app-server once no turn ran; the ChatGPT app shows that as an error and relaunches (#4550). With Codex kept on the first account there is no switch, but the used-up takeover (magpie made Codex's provider for a used-up account and given back once it has room; |
||
|
|
2a19043afc |
library: a skill's files are read as Markdown and edited in the page (refeccd)
refeccd on Discord kept skills in ~/.agents/skills, handed them over to
magpie ("let magpie manage"), and then had nowhere to edit them: the
Library's skill view showed SKILL.md as raw text with no way to change
it. There never was an edit path; this adds one.
- GET /api/library/skill takes `file` and answers library.ReadSkillFile:
the file (SKILL.md by default), its text, the skill's folder and its
text files (UTF-8, no NUL, up to 1 MB each, 200 listed, SKILL.md first;
links, hidden folders and what installing writes left out).
- POST /api/library/skills/save {name, file, text, was} is
library.SaveSkillFile, through change(): it writes only a regular
file already in the skill's library folder (no .., no absolute path,
no link, no folder that is a link out of the skill, nothing under
node_modules/.venv/…), refuses when the file no longer holds `was`
(the text the page opened), keeps CRLF line ends, and writes with
edit.WriteAtomic. The sync after it reaches every agent: a linked
one reads the library's folder, a copy is made again. A copy edited in
an agent before the save is older, so takeEdits sets it aside in the
backups. A GitHub skill saved here reads as Changed here, so an update
asks first.
- The page (viewSkill in plugins/library/client.js) draws a Markdown
file with the Plugins page's own renderer (plugins.js exports it as
window.mdRender, 27 bytes of core script) and its front matter as
rows; other files as text. Edit swaps in a text box; Save or ⌘S/Ctrl+S
sends it; Cancel asks when there are changes. Other files are the
app's menu under the name (no native select). New code is in the
library plugin, so the core script budget is not raised.
- SkillText is gone (its only caller was the route). One new string, in
all five languages. docs/subsystems/library.md says all this.
Run on mote at the change rebased on
|
||
|
|
b967b16208 |
usage: a Zhipu pay-as-you-go key's balance card; SiliconFlow's says its query is gone
nam.haid on Discord: the Usage page showed no balance for a Zhipu key,
and SiliconFlow's card always said only "暂时无法获取额度".
Zhipu / Z.ai: nothing read a pay-as-you-go key's balance. BigModel has no
documented balance API; its console asks
/api/biz/account/query-customer-account-report with the key as a Bearer,
and it answered a real key (the owner's, 2026-11-03) the same at
open.bigmodel.cn, www.bigmodel.cn and api.z.ai:
{"code":200,...,"data":{"balance":0E-9,...,"availableBalance":0E-9,
"frozenBalance":0E-9,...},"success":true}; a bad key gets code 1000 at
HTTP 200. zhipuBalanceSource reads availableBalance at the key's own host
(¥ on bigmodel.cn, $ on api.z.ai). A refused key says so in the words the
Coding Plan card already uses (zhipuRefused), another code says its code
and msg, a reply without availableBalance is an error, never a balance. A
GLM Coding Plan key (a base under /api/coding/, or a key on the "coding"
plan) isn't asked: its plan windows are its card. A key seen only at the
shared /api/anthropic endpoint gets a card only once the account was ever
paid in. KeyBalances now skips a key whose own plan has no balance
source, so a mixed provider's Coding Plan key gets no stray card.
SiliconFlow: /v1/user/info answers 410 (code 20092) since 2026-08-14 and
its release notes list no replacement through 2026-10-21. The reason was
already read but shown as the generic line, with the last balance kept.
It is now a typed error (siliconFlowRetired): no kept balance, the card
says the API is gone in the user's language (en, zh, zh-TW, ja, de) and
its "Open the console" button opens cloud.siliconflow.cn (or .com).
Run at this head, rebased on origin/main
|
||
|
|
bc10a61985 |
agents: Claude Code's status line, the 5h and 7d use, is a switch on its row (steven_4422)
steven_4422 on Discord asked for the 5h and 7d account use in Claude Code. magpie has had `magpie statusline` since #1997 (kensenzhao), but it was found only in docs/reference.md and needed a hand-written settings.json entry naming a `magpie` the app doesn't put on PATH. Claude Code's row now has a "status line" square beside ultracode (the same toggle, now a table, TOGGLES in app.js), and `magpie claude statusline on|off` in the CLI. On writes settings.json's statusLine as {type: command, command: "<this magpie's full path> statusline"}, quoted for a POSIX shell (Git Bash on Windows, forward slashes). The command reads the gateway's kept windows with a 1s timeout and prints nothing when it can't, as before. - A status line of the user's own is never written over: the square isn't offered while one is there, on is refused, and off and Disconnect leave it byte for byte. Ours is a single plain command whose program is magpie/magpie-* and first argument statusline, so a hand-written one from the reference counts and a compound (&&, |, ;, $(...)) is the user's. - An unreadable settings.json is not written over. - Disconnect takes magpie's status line out with the rest. - Quiet: Claude Code reruns a changed statusLine command in its open sessions, so no restart notice. - Not offered for a WSL distro, and a distro's settings.json isn't read for the options (a stopped one would start, #3896). A stopped distro's fields fall back to magpie's models as options, so without a case in wsl.go its square would have listed models (TestWSLClaudeNoStatusLine). Run on mote (go1.26.8, load ~400): - at f33e6d112 (rebased on |
||
|
|
01de489de1 |
search: a ChatGPT account searches for another model by the backend's own search (lucy_85908)
A third-party model in Codex (DeepSeek, MiniMax, ...) had its web searches made by asking gpt-6-luna on the Codex account to search through /responses. A ChatGPT account now searches by the ChatGPT backend's /alpha/search, the request Codex's web.run sends by itself with no model turn (codex-rs ext/web-search): one search_query, the account's small model in "model", allowed_callers ["direct"], and external_web_access from the client's web_search tool (#5018: Codex's "cached" sends false; live by default). The output's pages are read by their 80-dash rule and ref_id; the private-use citation marks are dropped. Measured on a real Plus account (2026-11-03, token not refreshed): 151 alpha/search calls left the 5h window at the same percent, ~1.5-2.2s each; 51 searches by gpt-6-luna took 0% -> 1% of it, 7-15s each, ~9-17k tokens in (40 of them: 414,585 in, 10,313 out). The backend answered the same for any "model" (deepseek-v4 too) and any max_output_tokens. - Automatic (and searchInTurn) picks the backend's search for a ChatGPT account; Settings > Web search offers "<id>/@search" as "its web search". "<id>" and "<id>/<model>" saved before still search by that model, so a user's pick is unchanged. - When the backend's search fails, the account's small model searches (codexSearchBy). - Codex web.run's own search for a non-ChatGPT model (alphaSearchHere) and a Responses request's web_search tool pass their mode on. Run at this head (rebased on origin/main), on mote: - go test ./internal/gateway/... ./internal/gui/ ./internal/agent/ -timeout 45m: gateway and agent ok; gui red only on TestMainWindowCorners/macOS_26_SDK (#3949, macOS 27 on mote). After the rebase: the gateway's search tests again ok. - searcher-pick.test.cjs: 22/22, chromium + webkit, en/zh (+ the label is in zh, zh-TW, ja, de). - gofmt -l clean; GOOS=linux go vet gateway, provider; GOOS=windows go vet gateway, gui. - Whole GUI suite on the Linux box (wsl-run): not finished when pushed; its reds so far are WebKit pages this doesn't touch (add-provider, API key palette, Routing headers, click-scroll, Codex resets). Broken by hand, each red: the Automatic switch (TestCodexSearchesWith ItsCheapModel, TestChatGPTAccountSearchesByItsWebSearch), the responses.go mode (TestResponsesWebSearchModeKept), the body's mode, the fallback, and the picker option (searcher-pick). Not tried: a real search through magpie in a sandbox (the request shape was tried by hand against the backend); an account out of its allowance (does alpha/search still answer?); the model fallback still searches live when Codex asked cached. Suggested by lucy_85908 on Discord. |
||
|
|
e41ef6288c |
providers: a spend cap on an API key, per day, month or in all (sparkling_lemur_62868)
sparkling_lemur_62868 on Discord: a team's OpenAI key holds granted credits that other docker services spend from too, and they want magpie to stop at a share of it. Their workaround was two magpies behind a gateway-key limit. What changed - provider: KeySpendCaps on a provider, keyed by the key's fingerprint (key_spend.go): USD over a local calendar day, a local calendar month, or in all since it was set. Since is kept while the cap stays one in all. SetKeySpendCap and ParseSpendCap refuse an amount outside 0 < usd <= 1,000,000 and an unknown period, and leave the saved cap as it was. Subscriptions are refused, since an account has its own usage-window cap. - usage: KeySpent(keyID, start) is what magpie's own calls on the key cost at the Usage page's prices. Turned-away calls and app-reported ones are left out. It reads usage.jsonl once per key and start, keeps the sum for 5 minutes, and Append counts each new call into it (spentNew). A read that a write races is read again. - gateway: perKeyEvery bars a key at its cap (spendHeld) as a usage cap holds an account. The next key serves, then the fallbacks. With none, the reply is 429 "spend cap reached: ..." naming each key, what it spent of which cap, and how to go on. Retry-After is when the soonest period renews; a cap in all gives none. A spend hold is not a usage cap: Stop at the caps and strictKeep don't end at it (capHeldOnly). The trace's barred row carries the cap, the spend and the period. - GUI: a pill on each key's row in the provider editor, for example "$7.50 of $20.00 today". It opens the app's menu (No spend cap, Per day..., Per month..., In all...) and then takes the amount in place, as the lane-limit pill does. A key at its cap gets a line under its row: "At its spend cap · back in ...". Every string is in all five languages. The pill and the line are in keyspend.js, which app.js imports when it draws a key's row, so the core's script budget is not raised. /api/providers' keyList carries spend, and POST provider/keyspendcap sets it. - CLI: magpie provider spend-cap <id> [key [usd [day|month|total]|off]] lists each key's spend and sets or removes a cap. - docs: providers-accounts.md and gateway-routing.md. Caveats, also in the tooltips: - What counts is magpie's priced usage, not OpenAI's bill. - A model with no known price counts $0. - Requests already under way when the cap is reached still finish, so a key can go a little past it. Run on mote at the pre-rebase head ( |
||
|
|
9c51f7fdbc |
gui: "deepseek-v4.1-flash tokens (est.)" is said in every language
WorkBuddy 0.2.19 (plugins #663) names the China build's token window "deepseek-v4.1-flash tokens (est.)". The GUI shows a window's name through t(), so zh, zh-TW, ja and de read it in English. Added beside "Free model tokens" in i18n.js, and to TestPluginWindowWordsSaidInEveryLanguage's workbuddy words, so a missing translation is red. Run on mote at this tree: go test ./internal/gui (ok except #3949's TestMainWindowCorners/macOS_26_SDK, unrelated, red alone on macOS 27); node --test internal/gui/tests/i18n-keys.test.cjs 4/4. Not tried: the card's look in the GUI with a real China account. |
||
|
|
3e31962225 |
provider: Request headers to pass, the agent's own values to its provider
A provider's fixed Headers can't say a value that changes from request
to request or from client to client. 3jRzfF52Qx on X asked for the
agent's own header values to reach the vendor. Each provider now has a
comma-separated list of request headers, saved as `passHeaders`. When the
agent's request carries one of them, its value goes to that provider as
the agent sent it.
- Where it is: the editor's "Request headers to pass" (zh 透传请求头),
under Advanced, right after Reply headers.
- The agent's value stands over a fixed Headers value of the same name.
When the agent sends none, the fixed one goes.
- Never passed on, listed or not (provider.RequestHeaderPassable):
- magpie's key: Authorization, X-Api-Key, X-Goog-Api-Key, Api-Key;
- cookies and sign-ins: Cookie, Set-Cookie(2), WWW-Authenticate,
Authentication-Info, Proxy-*;
- the connection's own fields: Host, Connection, Keep-Alive, TE,
Trailer, Transfer-Encoding, Upgrade, Expect;
- what magpie writes for the body: Content-*, Accept,
Accept-Encoding;
- Origin, Sec-* and X-Magpie-*.
Save refuses such a name with a reason (RequestHeadersOK), and so does
the editor, before the save. The editor's list is held to Go's by
TestReplyHeadersNeverAsTheProvidersAre. A name written into
providers.json by hand is dropped on read.
- Only that provider gets them. forwardOnce, which every chat,
responses, messages, count_tokens, group-member, fallback and plugin
try goes through, puts the agent's headers in the try's context under
the try's provider id (WithClientHeaders). Provider.Sign passes only
what that id lists, before an account signs, so a signed-in account's
own signing still wins. A plugin's fetch gets them in req.Header.
- Wire headers are still masked when read (
|
||
|
|
63dc359fb4 |
providers: a subscription account's rest, or its model's, shows on its row (maxleebeta)
maxleebeta on Discord (#feedback): WorkBuddy answered 429
{"type":"rate_limit_error","message":"WorkBuddy: 您的使用量已超出频率限制,将在
2026-11-03 23:57:19 UTC+8 重置,您也可以切换其他模型继续使用。"} while the
provider's card said 1,934/2,350 credits left (82%), and nothing on the
Providers page said the account was held back.
Routing already handled the refusal: resetsWhen reads the time (UTC+8, the
space before 重置 included), failure() gives failQuota, and since it says
切换其他模型 the rest is that model's alone (restID), by "resets", till
15:57:19 UTC; the account's other models are still asked (#1669). What
was missing was the page: a key's rest showed on its row, an account's
never did.
- gateway.RestsUnder(prefix) lists the rests in force under a key prefix
(provider@ for a subscription's accounts, provider@user/model for a
model's), with Key and the rest's note (Model, By, Error).
- providerJSON.accountRests gives them by user in lower case, the model
filled in from the key when the note has none; provider.KeyRest gains
By, Model and Error.
- app.js: the account row in the provider editor gets a line per rest
(accountRestLines): "<model> resting · 429 quota used up · back at
<time>" or "Resting · …" for the whole account, the vendor's words
beside it (shown whole when it names a time magpie couldn't read, so
an unknown format still says why), and Try now (gateway/unrest by the
rest's key). The key row's rest line is now the same helper
(restLineOf), so app.js grows ~800 bytes, under the core budget.
- New strings in zh, zh-TW, ja and de. docs/subsystems/gateway-routing.md
says where the Providers page reads them.
Not changed: the "-sg" maxleebeta saw in pi is WorkBuddy AI's own model
id (deepseek-v4.1-flash-sg, the paid Singapore id beside the free
deepseek-v4.1-flash); pi's footer and model picker show ids by design,
and the name magpie writes for it is the vendor's ("Deepseek-V4.1-Flash",
"(SG)" added by the plugin only where two ids share a name). Neither
magpie nor the plugin appends "-sg"; the CN build has no -sg ids.
Run (mote, through mote-run):
- go test ./internal/gateway ./internal/gui ./internal/provider at f0df4bb2b
(base
|
||
|
|
889767b7b3 |
routing: a failed try's tag over its row is whole until it fades (yuancjun)
yuancjun on Discord (#feedback, v0.1.2784, Chrome 128 on macOS): a member
row's failure tag ("504 · 迟迟未开始") showed whole for ~0.45s, then its
top half, the ~10px over the row's top edge, was cut off until it faded
at 1.8s. Their analysis was right: `.rt-accts .tag` sits at top:-10px,
`.rt-accts li:not(.hit)` has content-visibility: auto (#3164), which
always paint-contains, and rerun() takes `.hit` off on the shake's
animationend at 0.45s while `.tagged` stays 1800ms.
The row is now drawn whole by a class of its own, `lift`, put on with
`tagged` and taken off 300ms after it, once the tag's .25s fade-out is
over: with `:not(.tagged)` alone the tag's top would be cut again for
the whole fade. The CSS rule goes on `:not(.lift)`; `.hit` always came
with the tag, so it adds nothing there. A row tagged again within 1.8s
(the next try failing on it) starts the 1.8s over: the first failure's
timer used to take the second tag down early. This is the only place a
row is tagged; nothing else in .rt-accts stands over a row's edge.
Run on mote (load 70-110 from other sessions' suites):
- routing-tag-whole.test.cjs (new): Chromium and WebKit, en, zh, zh-TW,
ja, de, 1100 and 420 wide, motion on (the shake must end for the cut
to show): 20 of 20 ok. It plays a live request failing 504 slow,
checks the tag's words, then at ~0.8s screenshots the band of the tag
over the row's edge and counts the tag's red in it, checks the row's
content-visibility while tagged and while it fades, and that rows go
back to auto after.
- At the rebased head (on
|
||
|
|
0872bc2a0e |
context: a request's text and reply from the request archive (wangbinyq)
wangbinyq on Discord: with the request archive on, clicking a block of
the context window card still said "只保留最近 10 个请求的原文", since the
card read only the last 10 bodies magpie keeps in memory.
What changed:
- /api/context/text tries memory first, then the request archive's copy
when the route names one (Route.Archive, the route found in the trace
or in the history file of the card's ?day=, HistoryRoute looks a day
either side). gateway.ArchivedPromptText parses it as PromptText does
and masks it through maskedCopy, as the body in memory is; it is
marked from "archive" and the card says so.
- New /api/context/reply: the reply to the request, from the Recent
calls (Server.ReplyBody) or the archive's Response. gateway.ReplyPieces
reads it into thinking/assistant/call pieces (conversationOutput, split
out of conversationTurn) after redact.ScrubJSON, and masks every piece
through maskedCopy. The card's text view has a Reply button beside
Close that shows it and goes back to the part.
- What is shown is what the archive stores, masked as the memory copy
would be, nothing more. A body or reply that can't be masked shows
nothing (404 "unread"); one the archive cut short isn't parsed ("cut");
one it names and doesn't have says so ("missing"), and one with no
archive copy keeps the old "only the last 10" line ("off"). A failed
bucket read is an error, not "gone".
- The archive read is capped at archiveReadMost and the last copy read is
kept 5 minutes, so the items opened one by one read it once.
- ctxtext.js takes the route (id and time) instead of the id; context.js
passes it (its one-line change paid for by a comment cut, core budget
not raised). New strings in zh, zh-TW, ja and de.
- docs/subsystems/gateway-routing.md (Prompt) and gui-shell.md.
Run on
|
||
|
|
2c214ce252 |
agents: Air's row says which of Air's own agents go through magpie (jumy_18634)
jumy_18634 on Discord picked a model on the Air (JetBrains IDEs) row and
found Air's Codex in IDEA 2026.3 still on another model. The model on an
Air row is the Magpie ACP agent's alone, and the row never said so.
What Air's own agents run, read from the jars (air-plugin
262.8665.521, Air app 262.1037.14):
- The IDE plugin's Codex runs this computer's codex (the terminal's
PATH, else the @openai/codex it installs) as `codex app-server` with
the user's CODEX_HOME or ~/.codex, and sets no model_provider
(CodexAppServerProcessKt, CodexCliUtils). Its menu is model/list, its
default config/read's model, and a task's model goes in thread/start.
Its Claude Agent runs claude with only Air's hooks in --settings.
So both are on magpie while Codex / Claude Code are connected here.
- The Air app's Codex runs with a CODEX_HOME of its own and JetBrains'
gateway ([model_providers.air-gateway]), and never is.
Changed: an Air row, opened, says to pick Magpie in Air's agent menu and
that the model there is Magpie's. The IDE plugin's row says whether
Codex and Claude Code are connected here, and so whether Air's Codex and
Claude Agent go through magpie; the app's says its own agents don't
(airSaid in app.js, words in zh, zh-TW, ja, de). air.go's comment and
docs/subsystems/agent-wiring.md say what the jars showed, in place of
"not tried in an IDE". Six Agents-page comments in app.js are cut to one
line each to keep the core under its budget, no raise.
Run at the pushed head, on mote:
- Codex 0.166.0 `codex -c check_for_update_on_startup=false app-server`,
as Air starts it, in a sandbox HOME with a magpie-style config.toml
(model_catalog_json, model_provider magpie on a fake gateway at
127.0.0.1:3599): model/list gave the catalog's two models, config/read
the config's model; after config.toml changed under the running
server, config/read gave the new model; a thread/start with model
kimi/kimi-k3 (as Air's CodexThreadStartParams sends it) and a turn
sent /v1/responses with model kimi/kimi-k3 to the gateway.
- GUI: agent-air-own.test.cjs (new), chromium and webkit, en zh zh-TW ja
de, 1100 and 640px: 20 of 20.
The 166 GUI files that reach the Agents page or i18n, both engines:
red only in page-width-steady, found-skill-pick-remove, mobile-web and
remote-magpie, which fail the same way alone on origin/main
|
||
|
|
e189542dfb |
providers: a new-api relay's user id is its own field beside the balance token (zxc56823)
zxc56823 (Discord #general) added a new-api site with a key and an access token. The balance card said 请在供应商的「请求头」中添加 New-Api-User = 你的 用户 ID, so they typed 272298 as a header's *name* and left its value empty. The editor drops a header with no value, so New-Api-User never reached /api/user/self. new-api v0.9's authHelper still answered 401 "未提供 New-Api-User", and the balance stayed unread. CC Switch asks for "User ID" in a field of its own and sends it as New-Api-User beside "Authorization: Bearer <access token>". magpie sends the same request apart from Bearer, which new-api strips. The id can't be worked out from the token or the key, so the field can't be zero-config. - Provider editor, Account balance: when the Balance URL is /api/user/self, a "User ID" field sits beside the token, with the line that says where the id is shown. The field keeps the id in the New-Api-User header row and redraws Headers. It keeps its focus while typing, and turns amber when what's typed isn't digits. - A header named by digits alone with an empty value is the user id. headersOf in app.js and userIDHeader in provider.go (cleanHeaders on save, and the balance read for an unsaved check) both send it as New-Api-User=<digits>. A New-Api-User with a value of its own wins, and the digits header is dropped. So the reporter's saved form now works without being retyped. - The 401's hint and the card's text name the User ID field, not Headers (en, zh, zh-TW, ja, de). - The core script budget is unchanged. The ~1.6KB is paid for by four comments cut in app.js. Run at this tree (on origin/main |
||
|
|
c9824bb364 |
usage: each request's row says the credits its reply said
jiabubu (Discord, #feedback) saw a WorkBuddy request's credits shown before, and now nowhere. The gateway still keeps them: usage.Record.Credits from the chat usage's `credit` (#2512) reaches the ledger through the WorkBuddy plugin on every endpoint shape. The ranking, Overview, tiles and Sessions show them too. The Requests list's rows never did: a plan's model there reads "—" for a price, and its detail had no line for credits. Now the cost cell of a row whose reply said credits shows "N credits" (the same ledCredits words as the ranking) in place of the dash, or under the API price reference when the model also has a price. The expanded row has a Credits line. A reply that said none still shows "—". This applies to every credit-priced provider, since it reads the record's credits and not the provider. Tests: - internal/gateway/plugin_plan_credits_test.go: a moved workbuddy-ai plugin replies with WorkBuddy's credit usage. Chat, Messages and Responses, each streamed and whole, each land 0.01 credits in the ledger. - internal/gui/tests/plan-credits.test.cjs: a new test checks the row's cell, its title, a row with no credits, a priced row with credits and the detail, at 1400px and 420px. Run at this head (mote, via mote-run): - plan-credits.test.cjs: 36/36 in Chromium and WebKit, en, zh, zh-TW, ja, de, 1400px and 420px. - go test -run 'PlanCredits|TestCoreScriptBudget|I18n|Lang' over internal/gateway, gui, usage and usageapi: ok. - gofmt -l is clean. GOOS=linux and GOOS=windows go vet for gateway, gui and usage: ok. - The other Usage page files the change reaches, alone, fail the same on the base as with it: - usage-agents-hide: 22 (#3414, #2276). - usage-fold: 4 (#3415). - usage-ledger: 6, "newest live route needs no return-to-live button" (#4078, #3104). usage-curve-zoom-back passes alone. - Rebased from |
||
|
|
6b81344301 |
library: the keep-here switch says sync, and is on while it syncs (bin.90)
bin.90 on Discord read the Library editor's 「只在这台电脑」 switch as a
LAN-sharing switch: "this computer only" says nothing about what it keeps
from where. It is about sync, so it now says so.
- Library editor (MCP servers, skills): the switch is "Sync to your other
computers" (同步到其他电脑 / 同步到其他電腦 / ほかのコンピュータと同期 /
Mit deinen anderen Computern synchronisieren), on while the server or
skill syncs. Its note says off keeps it here, and a sync from the
others neither removes it nor replaces it.
- The stored value keeps its meaning: `local` true is still kept here.
The switch shows !local and saves !on, so every saved library.json,
sync payload and CLI flag (`magpie library mcp local NAME on|off`)
means what it meant.
- Row tag: "Not synced" (不同步 / 同步しない / Nicht synchronisiert) where
it said "This computer only", in the Library, the TUI ("not synced ·")
and `magpie library` output.
- Agents page sibling (the same words for an agent's picks): its menu
item is "Don't sync picks to your other computers", its tag "Not
synced". The agentsHere setting is unchanged.
- docs/subsystems/library.md and sync-backup.md name the new labels.
app.js stays in its budget: origin/main
|
||
|
|
2cfeda3d3a |
routing: a group editor's Cancel and Add have the scroll capsule above them, their ground to the window's edge
jiabubu on Discord: in a Routing group editor, its bar of Cancel and Add,
held at the window's foot while the editor runs on below, had the Scroll
to top and Scroll to bottom capsule over Add, and under the bar's ground a
gap above the window's bottom edge.
- The capsule (scrollends.js) rose above Providers' sticky Add bar only.
It now rises above any page foot marked .view-foot that is under it,
and the editor's bar is one. A foot elsewhere on the page, not under
the capsule, leaves it where it was.
- The bar was held at bottom: 0, which stops at the view's own foot
padding (4px, 8px in the window, max(12px, the safe area) on the phone
page, from app.css), so that much of the page showed under it. It is
now held that far down, its ground to the window's edge; on a phone
page its buttons keep the safe area under them.
routing-editor-foot.test.cjs: sixteen groups, then New group, scrolled so
the page is a screen down and the editor runs on below the window: the
bar's foot at the window's edge, the capsule above the bar and over none
of its buttons, and Add's right end taking a click as Add. Desktop 1100,
700, 560; browser page 1100, 700, 440, 360; Chromium and WebKit,
en/zh/zh-TW/ja/de.
Run on mote (mote-run):
- routing-editor-foot, Chromium and WebKit, en/zh/zh-TW/ja/de: 10 of 10
ok.
- At b3cf5641a (this change on
|
||
|
|
8af751987c |
providers: the id beside a model's name in Names & levels is its own, not the one it is Listed as
axelburks on Discord: once a model is Listed as another id in its
provider's Names & levels, the read-only id after its name showed the
listed id, and the id the provider is asked for was gone from the
editor. The row drew m.id, which for a listed model is the id it is
listed by; the provider's own id is in m.vendor (modelJSON sets it when
the two differ). The box now shows m.vendor || m.id. The Listed as field
still holds the listed id, and every agent still sees the listed one.
Run at this head (mote, Playwright 1.62.0): the 21 GUI files that draw
or read a Names & levels row (provider-listed-as, provider-same-as,
provider-levels-save, provider-levels-scroll, names-fold, name-suffix-*,
model-price-*, model-api-*, provider-detect*, vision-not-marked,
readable-focus, ux-safety, inner-scroll-contain, models-select-all-api,
model-reasonless), each in Chromium and WebKit and in every language the
file covers: 309 of 310 pass. The one red is provider-levels-scroll in
WebKit (760 !== 644), red 3 of 3 alone at origin/main
|
||
|
|
96acc59c4d |
routing: a group's tags, a provider's segments and the live stage stay inside the window
young02036 on Discord: a long line in a group's row ("WorkBuddy AI · Hy3 ·
免费") made the Routing page wider than the window, with a scrollbar under
it. v0.1.2769 held the member lines; the rest of each row could still go
past it:
- a group's tags never shrank or wrapped (flex: none, nowrap). With many
tags (German's long words, or any language at 700px) they pushed Edit
and the switch out past the row's edge, where the list cut them off.
The tags now take up to half the row and go onto more lines, each one
ellipsized; on a phone page they keep their own line as before.
- a provider's Routing and Stays segments (several accounts or keys) sat in
an auto-wide grid column and ran out past the row in the desktop window,
63px in Chinese and 265px in German at 560px. The column is now as wide
as the row has room for, and the segments wrap there, as they already
did on the browser page.
- in WebKit the live stage's "No request yet" row, out of sight
(content-visibility), kept the width it was last drawn at in a wider
window. In a grid column as wide as its rows, that held the stage, and
the page, 1193px wide in an 880px view after a group's editor opened.
The stage's list now has one column as wide as itself.
routing-rows-fit.test.cjs: three groups (smart, manual, and an order group
with every tag a row can carry) of the reporter's WorkBuddy AI members and
long model names, and a pooled provider. The list, then each group's
editor in turn on one page, at each width down to 560px (desktop) or 360px
(browser page) and back to 1440: the view and the document no wider than
the window, and every row's tags, buttons, switch and segments inside the
row. Chromium and WebKit, en/zh/zh-TW/ja/de.
Run on mote (mote-run) at the pushed head:
- routing-rows-fit and routing-accounts-narrow, Chromium and WebKit,
en/zh/zh-TW/ja/de: 20 of 20 ok. At origin/main's routing.css (rows-fit
copied in): red in both engines, en and de ("desktop list 700px: each
row's tags, Edit, switch and segments inside it").
- With the next two commits and the one before, at 77eed2ea4 rebased on
|
||
|
|
ecdb80f7f1 |
routing: under the requests, providers flow in columns, each heading over its own
jiabubu on Discord, on v0.1.2774 in a narrow Windows app window: Usage &
keys still listed the providers one under the other.
|
||
|
|
a2bba792d5 |
gui: a dragged row lands where it is let go when what is above its list moves
yuancjun on Discord: dragging a group member's handle on the Routing page
jittered, and the member landed two or more places from where it was let
go, so the group's priority changed to an order nobody chose. dragRows
measured every row once, at the press, and moved the held row by the
pointer's travel. The Routing page's live stage above the groups grows and
shrinks as requests come in, so mid-drag the rows moved under the
pointer while the slots were reckoned from where they had been.
dragRows (app.js, shared by the agents, providers, accounts, groups,
members and rules) now places the rows each frame from the list's own
top and the rows' offsetTop, the held row at the pointer less where it
was grabbed, and keeps drawing frames while the drag lasts. A row taken
out from under a drag cancels it. Routing's member and rule drags join
the group drag's guard: a redraw of the groups waits until the drag is
let go (the shared `arranged` idle in client.js), and a second press
during one is ignored.
drag-rows-shift.test.cjs: a group's members dragged in its editor while
a 90px block is put in above the groups (and, the other way, taken
out) mid-drag. The held row stays under the pointer (within 2px) and
the saved order is the slot it was let go in. Chromium and WebKit,
1100 and 560px, en/zh/zh-TW/ja/de.
Run on mote (mote-run):
- drag-rows-shift.test.cjs: 10 of 10 ok; on the old app.js and
client.js 0 of 10 (the row 90px off the pointer, the order a slot off).
- every GUI file that presses the mouse (grep mouse.down), plus
grip-inset, fold-show-grip, click-scroll, agent-disconnect and
plugin-actions: 620 tests, 600 ok. The 20 reds are
routing-rule-drag (chromium en/zh/zh-TW/de, its hover check before any
drag; #3789, #4585) and segs-press-redraw (16, searchAllRow; #4566).
Both files run alone at origin/main
|
||
|
|
1d8658abca |
routing: a group's model picker offers the providers' image models, and a group of them draws (jzw690 on X)
jzw690 on X: the Routing page's group editor ("Add a model") listed no
image models, so a group of image models, to draw at
/v1/images/generations and to pick in Settings > Images, couldn't be
made.
What changed:
- /api/groups gains `drawers`: each provider's image models
(gateway.Drawers, less ones unticked in its editor unless a group
names them), apart from the chat `models`. The picker offers them
after the chat models, noted "<provider> · Image model" (an existing,
translated key); a member row says so and offers no reasoning level.
Decision-model groups don't offer them. Image models stay out of the
chat catalog, so agents are not offered them.
- An image member drew only when its provider had no picks: picks are
of chat models, so membersFound dropped it as unpicked, and GroupDraws,
resolveDrawing, the group's turns and DrawerMissing all failed.
provider.FindDrawingGroup keeps such a member when drawsModel holds;
the image path uses it (drawingMembers), video keeps FindGroup.
DrawerMissing for a group ref asks GroupDraws.
- Routing card: such a member reads ready (groupsState), and Settings >
Images lists every group that draws, not only those reached through
Served.
- docs/subsystems/gateway-routing.md says so.
Tests:
- TestImageGroupOfUnpickedImageModelsDraws (gateway), from the
reporter's case: two key providers whose live lists hold gpt-5.5 and
gpt-image-2, one with gpt-5.5 picked. group/<id> draws at
/v1/images/generations (the first member's 502 moves on to the next),
as the Settings pick a request naming no model draws, and the model
gone from the list makes it missing.
- TestGroupEditorOffersImageModels (gui): drawers listed, an unticked
one not offered unless a group names it, none among chat models, the
group's members ready, Settings offers the group.
- group-pick-drawers.test.cjs: the picker offers it with its note, adds
it, no reasoning button, Save posts it; en and zh, Chromium and
WebKit.
Broken by hand: drawingMembers passing nil instead of drawsModel made
the gateway test red ("group/pix-images doesn't draw"); turning off the
groups.go drawer branch made the gui test red ("group not ready").
Run at
|
||
|
|
03d7927a8f |
search: Settings' search help says a picked provider that can't search gives way (plugins#635)
|
||
|
|
809801f1fb |
gui tests: every short default timeout gets a minute to load the page (#4787)
nav-timeout was red on main: five page and panel setDefaultTimeout calls had no setDefaultNavigationTimeout beside them, so on a busy machine their first page.goto had only 5s or 8s: - account-rows-fit ( |
||
|
|
37cc86b3b9 |
routing: an account refused for its sign-in has Sign in again on its card
adorable_piglet_80622 on Discord: the Routing page's Codex card said
"尝试 14 应答 8 / 2 需要重新登录, 4 失败 / 最近应答 10:41" for a ChatGPT
Plus account the editor showed in use, its usage read fine, and there
was nowhere to sign it in again ("我也没有重新登入的地方").
"sign-in required" on the card is the day's count of tries refused for
the sign-in (failAuth: a 401 with a revoked/invalidated token). The card
gave no way to act on it, and kept saying it after the account answered
again, so a past refusal read as the account's state now.
- The day's tally (DayTallies) says when the account's latest refusal
for its sign-in was (authAt), beside when it last answered (last); the
kept requests on the page update it too.
- Refused and not answered since: the card has Sign in again, which
opens the provider on the Providers page and starts the same sign-in
as the editor's own Sign in again (startSignIn with the account).
Codex's own sign-in (relayed as Codex sent it) signs Codex in.
- Answered since: the count reads "sign-in refused (answered since)"
(zh, zh-TW, ja, de), with no button.
Routing itself was not changed: a sign-in refusal rests nothing, and a
revoked mark is cleared by a 2xx or a good usage read (ServedSignIn),
so an account the editor shows signed in is tried again. With one
Codex account, Codex's turns go out as Codex sent them and are shown on
the "OpenAI · Codex's own sign-in" card, not the account's own card;
that may be the "no longer routed" the reporter saw, and is not changed
here.
Run at the pushed head (on mote):
- internal/gui/tests/routing-sign-in-again.test.cjs (new): chromium and
webkit, 1100px and 420px, en/zh/zh-TW/ja/de, plus i18n-keys: 26/26 ok.
- every internal/gui/tests/routing-*.test.cjs (150 files), both engines:
no failure in the first 822 subtests (at the pre-rebase base); the
run was still going at push.
- after the rebase on
|
||
|
|
f49f6ba686 |
tray: a usage window's name and unit read as its card says them (yi_time)
yi_time on Discord (Windows, v0.1.2777, magpie in Chinese): the tray
icon's tooltip said "WorkBuddy / Credits 0 / 500 credits · 已用 0% · 27 天
13 小时 后重置". The window's name and unit come from the WorkBuddy plugin
in English. The Usage page's card says both with t() (t(w.name),
t(w.unit)), so it read 积分 there, but trayCardText wrote them as given.
The fix is for every window, not WorkBuddy only:
- traywords.go reads the page's own table (embedded assets/i18n.js, once)
and trayCardText says each window's name, and each " · " part of a
pool's or family's name, and its count's unit, from it. The tray now
reads as the card does in zh, zh-TW, ja and de; English is unchanged.
- i18n.js gains the window names and units plugins report that it lacked
in every language, so the card had them in English too: Extra credits,
Prepaid credits, Free model tokens (workbuddy); Add-on, Dedicated,
Shared, Total credits (qoder); Monthly credits, Purchased credits,
5-hour window (agnes); Promotional Credits (gcp-ai); Free models
(devin); Free usage, Monthly, Included (cursor); Free trial (kiro);
Dollar Usage (trae); Neurons/day (free allowance) (cloudflare-workers-ai);
AI Q&A and the unit "questions" (orcaterm). Collected from
magpie-community/plugins origin/main usage() results. No plugin change
is needed: the plugins send English words, and magpie translates them.
Tests:
- TestTrayTooltipSaysWindowWordsAsTheCard: yi_time's card (Credits,
0 / 500 credits, 27d 13h) gives the exact tooltip in all five languages,
and a pool's window ("Gemini · 5 hours") is said in its parts.
- TestPluginWindowWordsSaidInEveryLanguage: each word above is in every
language's table. TestParsePageWords: two pairs to a line, escapes, a
comment and NOTICES left out.
- quota-window-words.test.cjs: the Usage card says WorkBuddy's and
Qoder's window names and unit in en, zh, zh-TW, ja, de, chromium and
webkit, 1100px and 420px.
Run at the pushed head 3886c2cc0's tree (on origin/main
|
||
|
|
84da86ebd5 |
gui: Hide accounts is one switch for every page, window and the panel (paultian)
paultian on Discord (#feedback): Routing, Usage and Providers each kept their own "Hide accounts" state, so turning it on in one page left the others showing emails. Now window.hideAccounts is one switch, one localStorage value (magpie.maskEmails), behind #rtMask, #usageMask and #pvMask alike. Flipping it in any page applies to every page at once, and a storage event carries it to other windows and the tray panel. The old magpie.maskProviders value is folded in on first load (hidden if either value was on) and then removed, so nobody who hid accounts on one page sees them shown after updating. The tooltip and the Settings line now say "on every page" instead of "on this page", in every language. Tests: provider-mask.test.cjs checks that one switch hides accounts on every page and in a second window, that the state survives a reload, and that an old maskProviders=1 comes through as hidden. account-mask's expected tooltip text is updated. Run on mote (GUI files at base 05aba5ca4; the Go asset/budget tests again at this head after rebasing on |
||
|
|
b295d11965 |
serve, update: one magpie works the gateway; the service waits, the copy an update left stops (#4938)
ox01024's #4938, Bug 2. Two magpies did the gateway's work at once on a Mac: - launchd's com.yetone.magpie.serve ran `magpie serve` beside the app. It ran startUp (plugin Settle/Refresh, FoldCopies, Hold, the agent moves), the plugin host and every account's model fetch, then failed to bind, exited 1 and was started again 5s later: 6,035 times in two days, a 279MB serve.log, and logins.json.lock held against the app's requests until they went 504. - The copy an update left (.magpie-update/old) handed the socket over, hid, and lived on ~3h, its loops writing beside the new one. What changed: - cli: `magpie serve` (no --web) checks codexrelay.Leave, gateway.ServedBy and gateway.Taken before startUp, as the app's serveGatewayLocked does. While the port is held it prints one line and looks again every 15s, doing nothing else. Once the port is free it serves (serve_wait.go). It waits rather than exiting 0: under KeepAlive SuccessfulExit:false a clean exit would leave no service after the app quits. - gui: after a handover the old magpie's loops end with backendCtx: - library.KeepLinked (now takes a ctx), - provider.WatchQuotas, - the menu bar usage loop, - the updater's check/auto-restart loop. lighten lets its hidden webviews go as lightweight mode does, so their polls stop. quitBy exits it at handedOffDrain + 3m whatever holds its quit up (gateway.HandedOffDrain getter; exitNow stubbable). - docs/subsystems/gui-shell.md says both. Run at the pushed head on mote (mote-run): - gofmt -l internal/: nothing. go vet ./internal/{cli,gui,library,gateway}; GOOS=linux go vet -tags nogui and GOOS=windows go vet of the same: ok. - go test -count=1 -timeout 45m ./internal/cli ./internal/library ./internal/gui ./internal/gateway at |
||
|
|
443e53d6b2 |
search: an AI Studio key that searches by googleSearch searches for other providers' models
cocoasoda on Discord: a Gemini AI Studio key provider searches natively
(googleSearch grounding, geminiKeySearches), but it never showed in the
search-for-other-providers (代搜索) list. searchRank knew only a Google
sign-in (googleAccount) at rank 5, so namedSearcherRank gave such a key
-1 and Searchers() left it out; autoSearcher never chose it.
searchRank now gives geminiKeySearches(p) rank 5 too: a saved key
provider, not a plugin, not Vertex, whose Gemini searches itself. That is
the same rank and the same googleSearch route as a Google sign-in, and
Searchers() marks it Own (it searches by its own tool, not a relay or a
search key).
Run on mote (macOS 27), at the rebased head e76db5515's tree:
- go test -count=1 ./internal/gateway -run
'AIStudio|GeminiKey|Searcher|WebSearch': ok; ./internal/gui -run
'Budget|Script|Search': ok; gofmt -l: clean.
- GUI: searcher-pick, searcher-then, search-instead, search-order,
provider-search (chromium + webkit): 84/84.
- Before the rebase, at
|
||
|
|
ffc4aa6844 |
providers: an Antigravity pool's meters and a family's set their own caps
pluviophile714 on Discord: an Antigravity (Google AI Pro) account row's
"上限 90%" pill says 每个窗口可单独设上限:点击下方它的用量条, and a click on
its "剩余 97.8% · 7d" meter did nothing. The class: a meter is a cap
button only when its window has a capId. Two kinds of meter never had one:
- A pool's own windows (Gemini · 5 hours / · 7 days, Claude & GPT · …),
set Aside for routing, got no Capped/CapID from WithCapped, and
routing's allowanceOf skipped them, so a cap there could not hold.
Now WithCapped marks a pool window that has members capped (CapsSome),
with CapID = its LineName ("gemini · 7 days", as both pools have a
"7 days"). allowanceOf hangs each pool window on its members' own
windows (Limit.pool), and CapHeld and NearCap count them through
capLimits, so a cap on it holds that pool's models only. Routing's
used-up and For still read the models' own windows, as before.
- A family's meter (windowCapMeter skipped `tiers`): several models'
windows shown as one (Gemini 3.1 Pro High/Low, a pool read without its
summary). It now posts every tier's capId in a new `windows` field;
provider.SetWindowCaps sets them in one save (SetWindowCap, the CLI's,
is it with one).
Changed for users: an account cap (the reporter's 90%) now also counts
an Antigravity pool's 5h and 7d windows, as the pill already says it
does ("each usage window"). Other Aside windows (on-demand spending,
Ollama's bought credits, MCP · Month) and windows past the first two
(tooltip only) stay unsettable: routing doesn't hold on them.
app.js shrinks 305 bytes (comments trimmed); no budget raised.
Run on mote (macOS 27), at the rebased head a2c1e8df1's tree:
- go test ./internal/gui -run 'Budget|Script', ./internal/provider -run
'Cap|Pool|Allowance': ok. GUI: window-cap-pool (new), window-cap,
quota-pools, quota-families, i18n-keys, chromium + webkit: 112/112.
- Before the rebase, at
|
||
|
|
c28220a5e7 |
sessions: a Codex thread saved on another provider resumes from Sessions
mrten_95615 on Discord: opening a Codex session from Sessions ran
`codex resume <id>` and Codex 0.166 stopped at "This chat uses custom,
but your current provider is magpie. Switch to custom to continue."
(modelProviderMismatch). Codex 0.166's app-server resumes a thread only
on the provider it was saved with (its state-database row, else its
session_meta), checked against the one config.toml (with -c) selects
(codex-rs app-server config_manager.rs load_for_resume); no flag lets a
resume go on another provider, and a provider config.toml no longer has
fails as modelProviderNotConfigured. Codex 0.165 resumed it on its own
provider without asking.
sessions.ResumeNow is the line that runs when the user opens a session
(GUI Terminal, TUI enter); the listed line is unchanged and nothing more
is read on a listing. For a Codex thread saved on a provider other than
the one Codex is on:
- config.toml still has that provider's table, or it is a Codex
built-in (openai, amazon-bedrock(-runtime), gcp, ollama, lmstudio):
`codex resume -c model_provider=<it> <id>`. Codex runs that embedded
(no shared daemon) on the thread's own provider.
- the provider is gone: MoveCodexProvider moves the thread to the
provider Codex is on (files copied to magpie's trash first, the state
row too) and it resumes there, the only way Codex resumes it at all. A
thread written to in the last minute or open in a Codex is left
(ErrActive) and the plain line runs.
A WSL distro's Codex session and every other agent are as listed.
Run at this head (mote):
- go test -count=1 -run 'TestCodexResume|TestMoveCodexProvider|TestCodexProviderIn' ./internal/sessions: ok
- go vet ./internal/{sessions,gui,tui}, GOOS=linux -tags nogui and GOOS=windows vet of them: ok; gofmt -l: clean
- At this head (rebased on origin/main
|
||
|
|
eb779ce92a |
gui: the tray icon's tooltip is in magpie's language (yi_time)
yi_time in #feedback: magpie set to Chinese on Windows, and the tray
icon's hover tooltip said "Today: 121K tokens (2.9K in · 180 out ·
118K cached)" and "3 requests" in English. The tray menu already
followed magpie's language (trayLang, #301); the tooltip's words were
hard-coded English in trayusage.go.
Now every tooltip is in trayLang(settings.Lang, systemLang), on
Windows, macOS and Linux alike. That covers trayIdleTip, magpie's
totals (trayTotalCard), and each subscription card (trayCardText: its
use or what is left, the pace, when it resets, until's d/h/m, "as of
…"). The words are in trayWords beside the menu's, for zh, zh-TW, ja
and de; English stays the key and the fallback. A window's name and an
error are still the card's own. A change of language in Settings now
also refreshes the tooltip (onTrayUsage); before, only the menu was
relabelled. The test-only trayUsageText and trayUsageView stay in
English, so the existing tests keep their strings.
Test: TestTrayTooltipFollowsMagpiesLanguage.
- yi_time's own numbers in zh: "magpie\n今天:121K token(输入 2.9K ·
输出 180 · 缓存 118K)\n3 个请求".
- The same numbers in en are unchanged.
- Covers the total card and a card's used, left, reset and as-of.
- For zh, zh-TW, ja and de, no English word in the idle, totals, card
(with pace) or combined tooltips.
Run at this head (rebased on
|
||
|
|
5573f79231 |
agent: an agent's own models say they go direct, and a pick of one asks before 接入 goes off (maxleebeta)
maxleebeta in #feedback: Pi 1.5.0 connected to magpie; picking one of Pi's own OpenCode Go models (opencode-go/<model>) turned 「接入」 off at once, with nothing said, while magpie's models kept it on. The cause: the pick writes defaultProvider opencode-go, so Pi asks OpenCode Go itself and magpie is no longer in its config, and Wired() is rightly false. What was missing is that the model said so. Options from ownProvider (every ownOptions agent: Pi, OpenCode, Crush, Goose, Cline, Hermes, Morph, OpenChamber, Qoder, StepCode, plugged agents, the WSL twins) and ompOwnOptions carried no Direct, unlike Claude Code's and Codex's own models. So the picker neither tagged them "direct, not via magpie" nor asked before a pick took the agent off magpie. Each now carries Direct = its vendor's name. The GUI already does the rest (pathTag, the leave-ask, direct options listed after magpie's). Tests: - internal/agent TestOwnModelsSayTheyGoDirect: Pi, OpenCode, Crush and omp, signed in to OpenCode Go, each give every opencode-go/ option Direct "OpenCode Go"; magpie's options have none. Picking one writes defaultProvider opencode-go. - internal/gui/tests/agent-own-direct.test.cjs: the tags, magpie's first, the ask (Cancel keeps 接入 on, nothing written), magpie's other model not asked, confirmed → written and off. Run in chromium and webkit × en/zh/zh-TW/ja/de × 980/420. Run at this head (rebased on |
||
|
|
2c2d2a5e51 |
gui: Test models says which key a test goes out with, when several are ticked (water5433)
water5433 (cduyzh) on Discord asked for Test models to say which
account a test uses. Their patch added "Tests use the preferred
account/key by default." to the button's tooltip for every provider,
in en, zh and zh-TW. Taken reworded, because it didn't say what the
code does:
- There is no "preferred" key and no other choice of one: TestModels
(keySeeing in internal/provider/test.go) sends each model with the
first ticked key that serves it, made for its endpoint first, so a
key that doesn't see the model is skipped. "By default" promised a
choice the editor doesn't have.
- A subscription account is a provider of its own, so "account" only
confused it; and with one key, or none, there is nothing to say.
So the line, "Each model is tested with the first ticked key that can
serve it", shows only when more than one key is ticked, in en, zh,
zh-TW, ja and de (theirs had no ja or de, and zh-TW said 默認 where
zh-TW says 預設; it now follows the key list's own 勾選/金鑰 words).
app.js stays in the core budget without a raise: the line's comment
and two comments beside it (modelTestWhy, modelTests, testOne) were
cut down.
Test: test-models-key-hint.test.cjs, every language, Chromium and
WebKit, 900 and 390 wide: with two keys ticked the tooltip has the
line, and still has it after a test run puts the title back; with one
of two ticked, and with no key list, it doesn't.
Run (mote-run, at this commit on origin/main
|
||
|
|
bf47eb46c4 |
gui: a long status line goes after 15s at most, not 80ms a character (water5433)
water5433 (cduyzh) on Discord: an error toast stayed on screen far too long. Since |
||
|
|
12599e9cd0 |
signin: ChatGPT signs in by device code, the first way from another computer
curtinp118 on Discord runs magpie on a VPS and opens its web UI from home. ChatGPT's browser sign-in comes back to localhost:1455, which is the viewer's own computer. The page there won't load, and the box's main line said "The account shows up here as soon as you're done", so the sign-in looked broken. The fix until now was to copy the dead page's address back by hand. ChatGPT now also signs in by device code, as `codex login --device-auth` does (codex-rs login/src/device_code_auth.rs). This is startCodexDeviceSignIn, with StartSignInWith site "device": - magpie asks auth.openai.com/api/accounts/deviceauth/usercode for a code with Codex's client id and headers; - the box shows the code and https://auth.openai.com/codex/device; - magpie polls deviceauth/token, where 403/404 means not entered yet, for up to 15 minutes; - it then trades the authorization code at the token endpoint with the returned verifier and the /deviceauth/callback redirect. Nothing listens on this computer. The window starts this way when magpie web is opened from a host other than localhost or loopback (remotePage in app.js). Either way, the box has a link to the other way: "Sign in with a code instead" or "Sign in in the browser instead". A device code that ChatGPT turns away (404) fails, and that box links to the browser's way. Strings are in zh, zh-TW, ja and de. providers-accounts.md describes the flow. This went over TestCoreScriptBudget. It now fits with no raise (1,533,700 of 1,533,802, on main's 1,533,789). The two way-switch buttons share one helper (codexWay), and eight comments on the sign-in code are cut down: openSignInPage, signingKept, startPluginSignIn, the sign-in proxy, signInProxyChoices, Copilot's GHE.com, dropSigningIn and renderStepPlan. Run on mote (the pushed head is rebased on |
||
|
|
8e9b048b65 |
settings: a row's explanation shows on hover, not under every name
The owner (11-02, a screenshot of Settings › 模型): hide the lines that
explain a setting and show them on hover, so the page reads quiet and
open ("很简洁,很有呼吸感"). Settings' rows now rest as a name and a
control. The pointer resting on a row (450ms, so passing over rows shows
nothing), or a key reaching its control, shows its explanation whole in a
card under the row's name, or over the row where the window ends; the
card takes no pointer and no row moves. It goes when the pointer or focus
leaves, a key is pressed, or the page scrolls (focus's card follows its
row instead, as Tab scrolls it into sight).
- app.css: in #view-settings, under (hover: hover), a .row.pref's plain
.sub lines are clipped out of sight, not removed, so a screen reader
and the search still read them; each carries --hint: 1, which the card
reads. A search shows them in place again, as before. A touch screen
keeps them all.
- Stays in sight: errors (.err, .bad), states (.say, [role=status],
.proxy-check), warnings (.image-gen-hidden, .sync-sign-in,
.vision-not-marked), .no-names, .pv-hits, .feat-why, .font-note, the
proxy in use (#proxySub), and any line with a button, link, input,
code or a search provider's failure note in it (.acts, which
settingshints.js sets on each such line as it is drawn, through a
MutationObserver, so before it is painted: Safari before 15.4 has no
:has(), and old-webkit holds the styles to 15.0). Disclosures stay too: what tracing sends (otel's
sessions row) and the allow list's addresses, as do a disabled
pattern's matches. .say is new, on the lines that are a state, not an
explanation: the version row's update state, a sync's last sync, the
sync notice, the web page's "Served" line, the local masking model's
state (downloading, on, failed; its two explaining lines, before it is
on, are hidden) and what Check in now came to.
- One-line rows are one height: a row left with its name alone was 48
to 51px by its control (the owner, 10-22: one-line rows of one
height), so under (hover: hover) every Settings .row.pref has a 27px
content-box min-height, 51px with its padding, its line above outside
it. Check in now's row aligns to its top, so its result line grows the
row down and the button stays where it was pressed.
- app.js stays in the core budget (1,533,799 of 1,533,802 at this
head, on main's 1,533,789) with three comments shortened, no raise.
- settingshints.js: the card and the .acts marks, a module app.js
imports at start, not in index.html (one line in app.js; old-webkit's
list of such modules names it). Its :focus-visible check is in a try,
as Safari before 15.4 throws on it.
Tests, run on mote (macOS) at this tree:
- settings-hints.test.cjs (new): Chromium and WebKit, 1100 and 420px,
en/zh/zh-TW/ja/de, Settings › Models. At rest the Image recognition MCP
server's line is out of sight and still in the page; a gone model's
error and an unticked image model's warning stay in sight; hover shows
the whole line in a card off the row's name, inside the window, no row
box moved, pointer-events none; the pointer leaving hides it; Tab (or
Option-Tab in WebKit) to the row's copy button shows it; a search shows
it in place; a line given a link shows at once and rests again when
the link goes. 20/20 green.
- Broken by hand: with the clipping rule's body gone, 20/20 red on "the
explanation shows at rest"; with app.js's import line gone, 20/20 red
waiting for the card; with the .acts observer gone, Chromium 10/10 red
on the link line. Before the kept lines and the row height were
in, checkin-now-account was 20 red (the result line hidden, then the
button moved 7px) and settings-general 10 red at 1000px (one-line rows
48, 50 and 51px); both green with them.
- settings-lines-wrap.test.cjs: a hidden explanation is skipped by its
"cut short" measure and checked whole in its card instead (#visionMcpRow
and the searcher row). 20/20 green.
- 22 more GUI files checked a Settings explanation's text, width or
wrapping in place; each now checks the text and that it is hinted, and
skips its geometry (redact-*, privacy-model, settings-general,
searcher-pick, disabled-models, the *-setting rows, images-codex-one,
and reply-model-setting, new on main since: red 20 of 22 on ".sub
fits" until it got the same check, then 22/22).
These 24 files: 536 pass, 2 fail, both images-codex-one's #pop picker
race, red the same on untouched origin/main
|
||
|
|
ae060550b9 |
claude-desktop: a tier's pick runs with its tier's Claude prompt (behavesAs)
moer2831 on Discord: a model picked for one of Claude Desktop's tiers ran
in the Code tab on Claude Code's generic prompt, not the one of the
Claude model of that tier ("通用提示词和对应模型提示词差距挺大的,感觉直接
蠢了一个度"). Desktop 4.29 and later hand Claude Code behavesAs only from
a profile's inferenceModels (z3t in 4.4212's app.asar: modelPicker
options with each entry's behavesAs).
What changed:
- gateway.DesktopInferenceModels: while a model is picked for a tier,
the list is every row /v1/models gives Desktop, by its id and in its
order (a non-empty list replaces discovery, pzn), with supports1m,
prefer1m and labelOverride as Desktop read them off the row, and a
pick's anthropicFamilyTier/isFamilyDefault. A pick that isn't a Claude
model gets behavesAs = its tier's newest Claude id (claude-opus-5-5,
claude-sonnet-5-5, claude-haiku-5-5, claude-fable-5-1). Nothing picked
(or a pick no longer listed): no list. Unreadable picks are unknown.
- agent: desktopSyncModels writes it into magpie's Desktop profile on a
tier's Set, as Desktop comes on magpie and on Sync; temp+rename, only
when it changed; taken away when nothing is picked. The list is
magpie's only while its hash is one magpie recorded (stash mark
claude-desktop.models); any other list (the user's) is never written
over or removed.
- Claude Code's modelSettings gets the pick's own window even when it
matches the default (claudeBudget.behaves), since behavesAs would
otherwise give it the Claude model's.
- GUI: the tiers menu ends with one line, "Claude Desktop reads the
tiers as it starts: restart it after a change." (en, zh, zh-TW, ja,
de). The Agents row's Restart already lights from the profile hash.
- docs/subsystems/agent-wiring.md and gateway-routing.md.
Run on mote at this tree (base
|