Swap the hand-drawn Cursor CLI placeholder SVG for Cursor's official cube/arrow brand mark and ensure model-id-shaped provider strings resolve to it. - Replace CursorCliIcon's placeholder rounded-square+badge SVG with Cursor's official cube/arrow brand mark path data - Add cursor -> cursor-cli mapping in inferProviderIconKey so cursor, cursor-agent, and cursor/<model> strings resolve to the branded icon instead of falling through to the generic CPU icon - Update ProviderIcon and providerIconKey tests to cover the new brand mark paths and provider-string inference - Add a patch changeset documenting the fix Files changed: .changeset/fn-7818-cursor-logo.md | 7 +++++ packages/dashboard/app/components/ProviderIcon.tsx | 33 +++++++++++----------- .../app/components/__tests__/ProviderIcon.test.tsx | 12 ++++++-- .../app/utils/__tests__/providerIconKey.test.ts | 4 +++ packages/dashboard/app/utils/providerIconKey.ts | 8 ++++++ 5 files changed, 44 insertions(+), 20 deletions(-) Fusion-Task-Id: FN-7818 Fusion-Task-Lineage: 73e85e18-e98a-4dc3-b89d-f831525620de Co-authored-by: Fusion (runfusion.ai) <noreply@runfusion.ai>
59 lines
2.4 KiB
TypeScript
59 lines
2.4 KiB
TypeScript
/*
|
|
FNXC:ProviderIcons 2026-06-25-00:00:
|
|
Command Center model analytics group rows by model id only, so dashboard model-name surfaces must infer the provider icon from the model/provider text before handing off to ProviderIcon's fallback-safe renderer.
|
|
|
|
FNXC:ProviderIcons 2026-06-28-20:46:
|
|
Standalone GLM model ids such as glm-5.1, glm-4.5-air, and glm-5v-turbo are Z.ai/Zhipu-family models even when the analytics label omits zai/zhipu. Match GLM only at model-id segment boundaries so unrelated words do not hijack the Z.ai provider icon.
|
|
*/
|
|
const GLM_MODEL_SEGMENT_PATTERN = /(?:^|[/:_-])glm(?:$|[\d._:-]|-[\da-z])/;
|
|
|
|
export function inferProviderIconKey(modelOrProviderName: string): string {
|
|
const normalized = modelOrProviderName.toLowerCase();
|
|
|
|
// Map common provider/model names to their icon keys.
|
|
/*
|
|
FNXC:ProviderIcons 2026-07-11-00:00:
|
|
FN-7818: model-id-shaped Cursor provider strings (cursor, cursor-agent, cursor/<model>) must resolve to the cursor-cli brand icon on model-selection surfaces instead of the generic CPU fallback, mirroring UsageIndicator's local mapping.
|
|
Run before broad model-family checks so cursor/gpt-5 stays Cursor-branded instead of OpenAI-branded.
|
|
*/
|
|
if (normalized.includes("cursor")) {
|
|
return "cursor-cli";
|
|
}
|
|
if (normalized.includes("claude") || normalized.includes("anthropic")) {
|
|
return "anthropic";
|
|
}
|
|
if (normalized.includes("codex") || normalized.includes("openai") || normalized.includes("gpt")) {
|
|
return "openai";
|
|
}
|
|
if (normalized.includes("gemini") || normalized.includes("google") || normalized.includes("antigravity")) {
|
|
return "google";
|
|
}
|
|
if (normalized.includes("ollama")) {
|
|
return "ollama";
|
|
}
|
|
if (normalized.includes("minimax")) {
|
|
return "minimax";
|
|
}
|
|
if (normalized.includes("zai") || normalized.includes("zhipu") || GLM_MODEL_SEGMENT_PATTERN.test(normalized)) {
|
|
return "zai";
|
|
}
|
|
if (normalized.includes("kimi") || normalized.includes("moonshot")) {
|
|
return "kimi";
|
|
}
|
|
if (normalized.includes("bedrock") || normalized.includes("amazon")) {
|
|
return "bedrock";
|
|
}
|
|
if (normalized.includes("xai") || normalized.includes("grok")) {
|
|
return "xai";
|
|
}
|
|
if (normalized.includes("opencode")) {
|
|
return "opencode";
|
|
}
|
|
if (normalized.includes("copilot") || normalized === "github copilot") {
|
|
return "github-copilot";
|
|
}
|
|
|
|
// Return the original name as fallback (ProviderIcon will show a default icon).
|
|
return modelOrProviderName;
|
|
}
|