This website requires JavaScript.
Explore
Help
Sign In
okooooooo
/
magpie
Watch
1
Star
0
Fork
0
Code
Issues
Pull Requests
Actions
Packages
Projects
Releases
Wiki
Activity
Files
eb4cc3437db348f2cd553896c76f022ef8ebd0c8
magpie
/
internal
/
gui
T
History
yetone
eb4cc3437d
gateway: a request an upstream fails is failed over rather than handed back — a model the provider says it doesn't serve (Copilot's "not accessible via the /chat/completions endpoint", "model does not exist" and the like) goes on to the next one, as a 401, 404, 429 or 5xx already did; an error a stream begins with, before any of its content (Anthropic's overloaded error after message_start, a Chat error chunk, Responses' response.failed), is held and failed over as an error status is, while one after content has begun reaches the agent as it came; the last one left, or the only one, is tried again twice after a failure that may pass (408, 5xx, 529, a 429 that says when), a second and then two apart or as Retry-After says; and an agent that goes away mid-request is counted as canceled, resting nobody and asking nobody else. One that answers stops resting. The Routing view tells each of these
2026-09-25 05:24:44 +08:00
..
assets
gateway: a request an upstream fails is failed over rather than handed back — a model the provider says it doesn't serve (Copilot's "not accessible via the /chat/completions endpoint", "model does not exist" and the like) goes on to the next one, as a 401, 404, 429 or 5xx already did; an error a stream begins with, before any of its content (Anthropic's overloaded error after message_start, a Chat error chunk, Responses' response.failed), is held and failed over as an error status is, while one after content has begun reaches the agent as it came; the last one left, or the only one, is tried again twice after a failure that may pass (408, 5xx, 529, a 429 that says when), a second and then two apart or as Retry-After says; and an agent that goes away mid-request is counted as canceled, resting nobody and asking nobody else. One that answers stops resting. The Routing view tells each of these
2026-09-25 05:24:44 +08:00
api.go
gui(panel): no dark band at the bottom while the tray panel grows — WebKit draws the page a frame or two after the panel's frame moves and filled the new edge with its own dark background; on the Mac the panel's webview now draws no background of its own and the page's colour is painted in a view under it that the system sizes with the panel, so the new edge comes in the page's colour until the page catches up. It looks as before; a change of theme fades it along; elsewhere, or when the webview won't, the page paints itself as it did
2026-09-25 02:19:32 +08:00
app.go
gui(panel): the tray panel's height glides with the agents' scroll as it unrolls and rolls up, on the same beat and curve, its top edge held under the menu bar — on the Mac the system animates the frame on its own display clock, elsewhere it steps a frame at a time; a fit that doesn't ask to glide still sizes at once, and
make dev
shells from before still size
2026-09-25 01:53:21 +08:00
bus_linux.go
import: magpie://import links add a provider after the user confirms
2026-09-24 12:17:45 +08:00
bus_other.go
import: magpie://import links add a provider after the user confirms
2026-09-24 12:17:45 +08:00
dev_off.go
dev: a Go change under
make dev
rebuilds and restarts only the backend — the API and the gateway — behind windows and a tray that stay up, and the page refreshes what it shows in place, keeping its tab and anything open; a build that fails leaves the running backend be (build/dev.sh)
2026-09-25 01:14:56 +08:00
dev_on.go
gui(panel): no dark band at the bottom while the tray panel grows — WebKit draws the page a frame or two after the panel's frame moves and filled the new edge with its own dark background; on the Mac the panel's webview now draws no background of its own and the page's colour is painted in a view under it that the system sizes with the panel, so the new edge comes in the page's colour until the page catches up. It looks as before; a change of theme fades it along; elsewhere, or when the webview won't, the page paints itself as it did
2026-09-25 02:19:32 +08:00
glide_darwin.go
gui(panel): no dark band at the bottom while the tray panel grows — WebKit draws the page a frame or two after the panel's frame moves and filled the new edge with its own dark background; on the Mac the panel's webview now draws no background of its own and the page's colour is painted in a view under it that the system sizes with the panel, so the new edge comes in the page's colour until the page catches up. It looks as before; a change of theme fades it along; elsewhere, or when the webview won't, the page paints itself as it did
2026-09-25 02:19:32 +08:00
glide_other.go
gui(panel): no dark band at the bottom while the tray panel grows — WebKit draws the page a frame or two after the panel's frame moves and filled the new edge with its own dark background; on the Mac the panel's webview now draws no background of its own and the page's colour is painted in a view under it that the system sizes with the panel, so the new edge comes in the page's colour until the page catches up. It looks as before; a change of theme fades it along; elsewhere, or when the webview won't, the page paints itself as it did
2026-09-25 02:19:32 +08:00
glide_test.go
gui(panel): no dark band at the bottom while the tray panel grows — WebKit draws the page a frame or two after the panel's frame moves and filled the new edge with its own dark background; on the Mac the panel's webview now draws no background of its own and the page's colour is painted in a view under it that the system sizes with the panel, so the new edge comes in the page's colour until the page catches up. It looks as before; a change of theme fades it along; elsewhere, or when the webview won't, the page paints itself as it did
2026-09-25 02:19:32 +08:00
glide.go
gui(panel): no dark band at the bottom while the tray panel grows — WebKit draws the page a frame or two after the panel's frame moves and filled the new edge with its own dark background; on the Mac the panel's webview now draws no background of its own and the page's colour is painted in a view under it that the system sizes with the panel, so the new edge comes in the page's colour until the page catches up. It looks as before; a change of theme fades it along; elsewhere, or when the webview won't, the page paints itself as it did
2026-09-25 02:19:32 +08:00
groups.go
gateway(routing groups) + gui(picker, gateway, routing) + codex: routing groups come first in the model picker under a routing icon of their own, each shown as its providers' icons stacked, and are listed first in the Gateway view's models too; a model is found to be the same under the ids its vendors give it — claude-opus-5-5 and claude-opus-5.5, dated or not — so the Claude subscription's Opus 5.5 joins its group; keys made for different protocols are pools apart, a request going round the keys that suit it before trying another's; Codex's model list is asked for as the newest Codex on the machine (codex --version) rather than the version its cache last wrote, so models only newer clients are shown — GPT-6 Sol and Luna — are listed; the Routing view keeps its providers in one order rather than reshuffling them per request; mask icons in the picker have a size to fall back on, so OpenRouter's and Copilot's show
2026-09-25 05:01:18 +08:00
icon.png
logo: a round magpie in black and white, drawn from one SVG
2026-09-24 01:09:59 +08:00
importapps.go
providers: import from other apps — the add sheet's Import… reads the providers CC Switch (its database, or the older config.json) and Alma have set up, read-only, and lists them to pick from: what magpie has already is marked, a key for a vendor that is already here can join it as another key, an id in use is kept beside or replaced, and sign-ins, Azure, Gemini-protocol relays and entries pointing at magpie itself are shown but not offered; keys are read again on import and only reach the window masked
2026-09-24 18:48:08 +08:00
importlink_test.go
provider: an import link can name the vendor's own icon
2026-09-24 17:13:03 +08:00
importlink.go
provider: an import link can name the vendor's own icon
2026-09-24 17:13:03 +08:00
providers.go
gateway(routing groups) + gui(picker, gateway, routing) + codex: routing groups come first in the model picker under a routing icon of their own, each shown as its providers' icons stacked, and are listed first in the Gateway view's models too; a model is found to be the same under the ids its vendors give it — claude-opus-5-5 and claude-opus-5.5, dated or not — so the Claude subscription's Opus 5.5 joins its group; keys made for different protocols are pools apart, a request going round the keys that suit it before trying another's; Codex's model list is asked for as the newest Codex on the machine (codex --version) rather than the version its cache last wrote, so models only newer clients are shown — GPT-6 Sol and Luna — are listed; the Routing view keeps its providers in one order rather than reshuffling them per request; mask icons in the picker have a size to fall back on, so OpenRouter's and Copilot's show
2026-09-25 05:01:18 +08:00
scheme_linux.go
import: magpie://import links add a provider after the user confirms
2026-09-24 12:17:45 +08:00
scheme_other.go
import: magpie://import links add a provider after the user confirms
2026-09-24 12:17:45 +08:00
scheme_windows.go
import: magpie://import links add a provider after the user confirms
2026-09-24 12:17:45 +08:00
trace.go
gateway(routing, live): the Gateway view plays what routing does with each request as it happens — the site's Model Routing stage, driven by the gateway's own trace: the agent, magpie with the provider's routing, and its accounts or keys in the order routing weighed them, each saying what it was weighed by (how much is used and when it renews, kept for last, not known yet, resting and until when, left out as its plan doesn't list the model); a request travels to the one put first, one that fails shows what it answered and hands it on, and the story beside it says why the first went first, why each other stands where it does, how long a failed one rests and what said so, and what the agent got; recent requests can be picked to see how each was routed, and the counts are the gateway's since it started. Nothing is worked out again in the page: the gateway records each decision where it makes it. A vendor's Retry-After and rate-limit reset headers now come through with its error, so a rate-limited key or account rests as long as the vendor says rather than a minute
2026-09-25 02:28:32 +08:00
tray.png
logo: a round magpie in black and white, drawn from one SVG
2026-09-24 01:09:59 +08:00
update.go
update: Update updates magpie in place — a click downloads the new version and restarts into it, asking for the password when magpie can't replace itself, instead of opening the release page; only a magpie running from its disk image or a temporary copy is sent to the download page, with why
2026-09-25 01:35:24 +08:00
usage.go
usage: the Usage page shows what is left on an API key beside the subscriptions' allowances — DeepSeek, Kimi, OpenRouter and SiliconFlow are asked by their hosts, and any custom provider can name its balance endpoint and where the amount sits in the reply (Balance URL / field in the editor,
balance=
/
balance.path=
in the CLI), each key it has on asked with itself;
magpie provider <id>
prints it too (
#40
)
2026-09-25 01:12:18 +08:00