The TUI's `a` listed only vendors magpie knows and pointed to `magpie
provider add <name> url=…` for any other, so on a server the TUI couldn't
add one's own relay (hezz1891 on Discord).
`a` now also offers custom-openai, custom-responses, custom-anthropic and
custom-gemini (the line says "or custom for your own API"). Picking one
asks for its base URL (an http(s) address, else said so), then its name
(enter for the host's), then its key, then adds it with provider.Add
and fetches its list, as a preset is added. The API sets the same URL
field as the CLI's url=/responses=/anthropic=/gemini=.
Run:
- TestTUIAddsACustomProvider: an OpenAI compatible provider on httptest
is added and lists its 2 models; a non-URL is refused; Responses,
Anthropic and Gemini each set their own URL; an empty name is the host.
It fails with the custom items taken out of the list.
- go test -tags nogui ./internal/tui (temp HOME, pinned caches): ok;
the tui tests built for linux/arm64 pass in debian:12-slim
- gofmt -l: none; go vet (darwin), GOOS=linux and GOOS=windows go vet
-tags nogui ./...: clean; darwin, linux, windows builds