mirror of
https://github.com/badlogic/pi-mono.git
synced 2026-11-05 23:37:25 +00:00
The top-level /login menu offers Sign in with Radius with its status, with an animated shimmer on the Radius row and a short Radius intro. After a Radius sign-in it offers to configure the Radius MCP server in the global mcp.json with auth.provider and reloads. Cancelling a login returns to the menu it was started from. OAuth sign-ins without a subscription are labeled as accounts. Co-authored-by: niloc <5925270+colindaymond@users.noreply.github.com>
11 lines
600 B
TypeScript
11 lines
600 B
TypeScript
import { DEFAULT_RADIUS_GATEWAY, normalizeRadiusGatewayUrl } from "@earendil-works/pi-ai/providers/radius-config";
|
|
|
|
export const RADIUS_PROVIDER_ID = "radius";
|
|
export const ENV_RADIUS_GATEWAY = "PI_RADIUS_GATEWAY";
|
|
/** MCP endpoint of the gateway the built-in Radius provider signs in to. */
|
|
export const RADIUS_MCP_URL = `${normalizeRadiusGatewayUrl(DEFAULT_RADIUS_GATEWAY)}/mcp`;
|
|
|
|
/** Radius gateway origin, honoring the `PI_RADIUS_GATEWAY` override. */
|
|
export function getRadiusGatewayUrl(): string {
|
|
return normalizeRadiusGatewayUrl(process.env[ENV_RADIUS_GATEWAY] ?? DEFAULT_RADIUS_GATEWAY);
|
|
}
|