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
bea2cec91fb04fd2630213234e8c047abb6ef00a
magpie
/
internal
/
gui
T
History
yetone
17bf6a15ce
routing: in Chinese, a provider row's "one key" is "一个 Key", and the caption under the map is said again in the new language when the language changes — it was set as text, so one said before Chinese was applied stayed English ("DeepSeek goes first.") while everything round it was Chinese
2026-09-25 17:20:35 +08:00
..
assets
routing: in Chinese, a provider row's "one key" is "一个 Key", and the caption under the map is said again in the new language when the language changes — it was set as text, so one said before Chinese was applied stayed English ("DeepSeek goes first.") while everything round it was Chinese
2026-09-25 17:20:35 +08:00
api.go
agents: the Agents list, in the window and the tray panel, is in the order you put it in and shows only the agents you want — an agent's logo is its handle: drag it to move the row, click it (or right-click the row) for Move up, Move down and Hide, or Alt+↑/↓ from the keyboard; a hidden agent folds away at the bottom under "N hidden" (in the fold with the unused ones, "Show N more"), and Show brings it back, kept in view even while nothing is set on it. The order and who is hidden live in magpie's settings.json (agentOrder, agentsHidden, agentsShown), never in an agent's files; an agent installed later follows the ordered ones in magpie's own order. magpie ls and the TUI keep the order too and list a hidden agent last, dimmed and marked, rather than dropping it, so nothing goes missing from a listing; magpie agents lists them all as before
2026-09-25 15:02:31 +08:00
app.go
agents: a model through magpie tells Pi, Crush, omp and Codex how much it holds, and a provider added, edited or removed reaches the model lists agents keep in files of their own — the catalog carried no context window, so Pi took every model through magpie for a 128K one (a CLIProxyAPI's gpt-5.5 holds 922K) and Crush for a 200K one; each model now carries models.dev's input limit, else its context, looked up by bare id as most of the providers serving it give it (a proxy's "openai/gpt-5.4", "gpt-5.4(high)", "glm-4.6:free" find it too; a group holds the least of its members'). And those lists were written only when a model was picked: Codex's magpie-models.json, Pi's models.json, OpenCode's, Crush's, Command Code's, omp's and Hermes' provider blocks and dsh's llm-deepseek entry kept the catalog as it was then, so a provider added later never showed. Saving a provider, a vendor's list fetched anew or models.dev synced now rewrites each one magpie wrote, where it differs, and the app does once at start-up; a Codex signed in to ChatGPT, which asks the gateway, kept its cached list under the backend's ETag, which a change of magpie's never changed — the ETag (and a reply's X-Models-Etag) now carries a tag of magpie's models, and a cache from before a change is aged so the next Codex asks again
2026-09-25 12:32:14 +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: copying goes through magpie to the system clipboard — the app's window loads its page from a scheme where the page's own clipboard API is refused, so every copy button only put the text in the status line; the page asks magpie first and falls back to that API in a browser tab
2026-09-25 09:44:45 +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
library.go
library: an agent switched on or off for a server or a skill on the Library page, and the agents picked when one is installed, are the ones kept — the page sends "agents", which the request's embedded instructions change took for its own Agents, so the server's or the skill's was always left empty (a server switched on for Claude Code was taken from every agent, a skill installed for Codex went to none); the request's Agents now answers to "agents" and is handed to the instructions when they are saved
2026-09-25 14:23:56 +08:00
providers.go
provider: a subscription used through its vendor's CLI — Devin's, Cursor's, Grok's — installs that CLI when its sign-in starts, if this machine lacks it, rather than leaving the sign-in to fail or, as Devin's did, to say "signed in" and show nothing: Devin's sign-in wrote credentials.toml, but magpie sees the account only through
devin auth status
, so with no devin CLI no provider ever came and nothing said why. The sign-in is now "installing" while the vendor's own installer runs (curl … | bash, or its PowerShell one on Windows, with magpie's proxy), then opens the vendor's page as before; the window says what it is installing and why, can cancel it, and a failed install says the installer's last line and the command to run by hand. What counts is the CLI being there afterwards — Devin's installer ends in
devin setup
, whose sign-in gives up without a terminal and fails the script after it installed everything — and on Windows the PATH the installer wrote is taken up so the running app finds it. A Devin sign-in the CLI then can't see fails, where it said done with no one; the tests no longer see this machine's own devin
2026-09-25 16:30:00 +08:00
scheme_linux.go
windows: the desktop app no longer opens a console window for every command it runs (
#54
) — it is linked as a GUI program and has no console, so each console CLI it started (devin auth status and models list, devin acp for every Devin turn, claude, codex, cursor-agent and grok probes and runs, grok login) was given a new console by Windows, and a Windows Terminal window with it, some every few seconds while the app sat idle. Every command magpie runs is now made through internal/proc, which starts it with CREATE_NO_WINDOW when magpie has no console of its own: the child gets a console without a window, and its output, which magpie always pipes back, arrives as before. A magpie run in a terminal (magpie serve, the TUI, the desktop app started from one with a command) has one, and its children share it as they did, so Ctrl+C there still reaches them. The relaunch after an update keeps its DETACHED_PROCESS, added to rather than replacing the flags it was made with, and a test fails on any command made with os/exec directly, so a new one can't bring the windows back
2026-09-25 14:04:44 +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
agent + gui: magpie and curl are clients the gateway knows by name, with their logos, beside the agents — the Usage and Routing views both draw a request's client from the one list, every agent in it whether it is set up here or not, where Routing only knew those found on this machine
2026-09-25 05:55:33 +08:00