Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ const MAC_PARITY_ACCENTS: Array<[string, string]> = [
["openaiapi", "#0f826e"],
["openrouter", "#6467f2"],
["perplexity", "#20b2aa"],
["pi", "#4d9abf"],
["poe", "#5d5cde"],
["qoder", "#10b981"],
["sakana", "#2975db"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ export const PROVIDER_ICON_REGISTRY: Record<string, ProviderIcon> = {
augment: { id: "augment", brandColor: "#1aa049", fallbackLetter: "A", svgPath: RAW.augment },
claude: { id: "claude", brandColor: "#cc7c5e", fallbackLetter: "◈", svgPath: RAW.claude },
claudeplatform: { id: "claudeplatform", brandColor: "#cc7c5e", fallbackLetter: "◈", svgPath: RAW.claudeplatform },
pi: { id: "pi", brandColor: "#7c3aed", fallbackLetter: "P" },
pi: { id: "pi", brandColor: "#4d9abf", fallbackLetter: "P" },
codebuff: { id: "codebuff", brandColor: "#00ff95", fallbackLetter: "B", svgPath: RAW.codebuff },
coderabbit: { id: "coderabbit", brandColor: "#ff5c35", fallbackLetter: "C", svgPath: RAW.coderabbit },
codex: { id: "codex", brandColor: "#49a3b0", fallbackLetter: "◆", svgPath: RAW.codex },
Expand Down
22 changes: 18 additions & 4 deletions rust/src/core/provider/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -713,10 +713,11 @@ mod tests {
(ProviderId::OpenCode, "#3B82F6"),
];

/// Mac CodexBar 0.70.0 descriptor colors adopted for parity: (provider,
/// previous Windows accent, Mac color). Source: the `color:` of each
/// `CodexBarCore/Providers/<Name>/<Name>ProviderDescriptor.swift`.
const MAC_PARITY_ACCENTS: [(ProviderId, &str, &str); 24] = [
/// Mac CodexBar descriptor colors adopted for parity: (provider, previous
/// Windows accent, Mac color). Source: the `color:` of each
/// `CodexBarCore/Providers/<Name>/<Name>ProviderDescriptor.swift`. Pi is
/// the later upstream change to its official brand color (#4690).
const MAC_PARITY_ACCENTS: [(ProviderId, &str, &str); 25] = [
(ProviderId::Chutes, "#FF5C35", "#3184FF"),
(ProviderId::Deepgram, "#13EF93", "#6467F2"),
(ProviderId::Doubao, "#2563EB", "#3370FF"),
Expand All @@ -730,6 +731,7 @@ mod tests {
(ProviderId::OpenAIApi, "#10A37F", "#0F826E"),
(ProviderId::OpenRouter, "#6B7280", "#6467F2"),
(ProviderId::Perplexity, "#1FB8CD", "#20B2AA"),
(ProviderId::Pi, "#7C3AED", "#4D9ABF"),
(ProviderId::Poe, "#5D5FEF", "#5D5CDE"),
(ProviderId::Qoder, "#2563EB", "#10B981"),
(ProviderId::Sakana, "#0EA5E9", "#2975DB"),
Expand Down Expand Up @@ -848,6 +850,18 @@ mod tests {
}
}

#[test]
fn pi_uses_its_official_brand_color_and_current_repository() {
// Upstream #4690: Pi's logo blue, and the project link it points to.
assert_eq!(brand_color(ProviderId::Pi), "#4D9ABF");
assert_eq!(
ProviderId::Pi.spec().metadata.dashboard_url,
Some("https://github.com/earendil-works/pi")
);
// `pi-mono` is kept as a parse alias for existing configs and CLI use.
assert_eq!(ProviderId::from_cli_name("pi-mono"), Some(ProviderId::Pi));
}

#[test]
fn cli_aliases_resolve_back_to_their_provider_and_are_unique() {
let mut seen = std::collections::HashMap::new();
Expand Down
4 changes: 2 additions & 2 deletions rust/src/core/provider/spec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,9 @@ pub(crate) static SPECS: [ProviderSpec; COUNT] = [
.dashboard("https://platform.claude.com/usage")
.status("https://status.claude.com/")
.aliases(&["anthropic"]),
spec(P::Pi, "pi", "Pi", "#7C3AED")
spec(P::Pi, "pi", "Pi", "#4D9ABF")
.labels("Session", "Weekly")
.dashboard("https://github.com/badlogic/pi-mono")
.dashboard("https://github.com/earendil-works/pi")
.parse_aliases(&["pi-mono"]),
// Upstream #2338: Cursor has no account credit balance to advertise.
spec(P::Cursor, "cursor", "Cursor", "#F54E00")
Expand Down
4 changes: 2 additions & 2 deletions rust/src/core/provider_registry_snapshot.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ Claude cli=claude display="Claude" cookie=Some("claude.ai") color=#CC7C5E deprec
map=["anthropic", "claude"]
metadata=ProviderMetadata { id: Claude, display_name: "Claude", session_label: "Session (5h)", weekly_label: "Weekly", supports_opus: true, supports_credits: true, default_enabled: true, is_primary: true, dashboard_url: Some("https://platform.claude.com/usage"), status_page_url: Some("https://status.claude.com/"), tertiary_label_key: None }
sources=[Auto, OAuth, Web, Cli] oauth=true web=true cli=true
Pi cli=pi display="Pi" cookie=None color=#7C3AED deprecated=false blocking=None
Pi cli=pi display="Pi" cookie=None color=#4D9ABF deprecated=false blocking=None
map=["pi"]
metadata=ProviderMetadata { id: Pi, display_name: "Pi", session_label: "Session", weekly_label: "Weekly", supports_opus: false, supports_credits: false, default_enabled: false, is_primary: false, dashboard_url: Some("https://github.com/badlogic/pi-mono"), status_page_url: None, tertiary_label_key: None }
metadata=ProviderMetadata { id: Pi, display_name: "Pi", session_label: "Session", weekly_label: "Weekly", supports_opus: false, supports_credits: false, default_enabled: false, is_primary: false, dashboard_url: Some("https://github.com/earendil-works/pi"), status_page_url: None, tertiary_label_key: None }
sources=[Auto] oauth=false web=false cli=false
Cursor cli=cursor display="Cursor" cookie=Some("cursor.com") color=#F54E00 deprecated=false blocking=None
map=["cursor"]
Expand Down