fix(brand): use black field for Codex tab avatar

This commit is contained in:
l0ng-ai
2026-07-20 18:14:36 +08:00
parent 3c7cff09ca
commit 6d9a2b3659
+9 -4
View File
@@ -184,13 +184,13 @@ impl CLIAgent {
}
/// Brand accent (0xRRGGBB) for the tab chip's agent dot. Chosen for legibility
/// on both light and dark themes rather than exact brand black/white — a pure
/// black or white dot vanishes against one theme, so vendors whose mark is
/// monochrome (Codex/OpenAI, Cursor) get a recognizable mid-tone hue instead.
/// on both light and dark themes rather than exact brand black/white. A pure
/// black or white dot vanishes against one theme, so monochrome vendors get
/// a recognizable mid-tone hue instead; Codex keeps its black field.
pub fn accent_rgb(self) -> u32 {
match self {
CLIAgent::Claude => 0xD97757, // Claude terracotta
CLIAgent::Codex => 0x10A37F, // OpenAI green (black mark reads as this)
CLIAgent::Codex => 0x000000, // Codex black field
CLIAgent::Gemini => 0x4285F4, // Google blue
CLIAgent::Aider => 0x14B8A6, // teal
CLIAgent::Amp => 0xF34E3F, // Amp red
@@ -763,6 +763,11 @@ mod tests {
}
}
#[test]
fn codex_avatar_uses_its_black_brand_field() {
assert_eq!(CLIAgent::Codex.accent_rgb(), 0x000000);
}
#[test]
fn detects_newer_agents_by_command() {
for (cmd, agent) in [