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>
41 lines
1.3 KiB
TypeScript
41 lines
1.3 KiB
TypeScript
import { describe, expect, it } from "vitest";
|
|
import { inferProviderIconKey } from "../providerIconKey";
|
|
|
|
describe("inferProviderIconKey", () => {
|
|
it.each([
|
|
["claude-sonnet-4-5", "anthropic"],
|
|
["Anthropic Claude", "anthropic"],
|
|
["gpt-4o", "openai"],
|
|
["openai-codex", "openai"],
|
|
["gemini-2.5-pro", "google"],
|
|
["google-antigravity", "google"],
|
|
["cursor", "cursor-cli"],
|
|
["Cursor", "cursor-cli"],
|
|
["cursor-agent", "cursor-cli"],
|
|
["cursor/gpt-5", "cursor-cli"],
|
|
["ollama/llama3", "ollama"],
|
|
["minimax-text-01", "minimax"],
|
|
["zhipu-glm-4", "zai"],
|
|
["zai/glm-4.5", "zai"],
|
|
["glm-5.1", "zai"],
|
|
["glm-4.5-air", "zai"],
|
|
["glm-5v-turbo", "zai"],
|
|
["kimi-k2", "kimi"],
|
|
["moonshot-v1", "kimi"],
|
|
["amazon-bedrock-claude", "anthropic"],
|
|
["bedrock-titan", "bedrock"],
|
|
["xai-grok-4", "xai"],
|
|
["opencode", "opencode"],
|
|
["github copilot", "github-copilot"],
|
|
["copilot-gpt-4", "openai"],
|
|
])("maps %s to %s", (input, expected) => {
|
|
expect(inferProviderIconKey(input)).toBe(expected);
|
|
});
|
|
|
|
it("returns unknown ids unchanged so ProviderIcon can render its fallback", () => {
|
|
expect(inferProviderIconKey("custom-model-v1")).toBe("custom-model-v1");
|
|
expect(inferProviderIconKey("not-a-glmish-model")).toBe("not-a-glmish-model");
|
|
expect(inferProviderIconKey("")).toBe("");
|
|
});
|
|
});
|