fix(dashboard): cut duplicate API/icon spam, lazy-load provider assets
Share one /api/models fetch via useModelCaps cache, mount ModelSelectModal only when open, stop double fetchModelAliases on CLI tool cards, and resolve provider icons through a session 404 cache with missing PNGs + loading=lazy. Also include Claude Exa MCP toggle (claude-settings + ClaudeToolCard) that was already in the working tree. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
68566f53dc
commit
ccb0842d0a
50 files changed
+612
-392
No files matched your search
@@ -10,6 +10,7 @@ import {
|
||||
Toggle,
|
||||
} from "@/shared/components";
|
||||
import ProviderIcon from "@/shared/components/ProviderIcon";
|
||||
import { getProviderIconSrc } from "@/shared/utils/providerIcon";
|
||||
import { OAUTH_PROVIDERS, APIKEY_PROVIDERS } from "@/shared/constants/config";
|
||||
import {
|
||||
FREE_PROVIDERS,
|
||||
@@ -756,12 +757,12 @@ function ApiKeyProviderCard({
|
||||
};
|
||||
|
||||
const getIconPath = () => {
|
||||
if (isCompatible)
|
||||
if (isCompatible && provider.apiType)
|
||||
return provider.apiType === "responses"
|
||||
? "/providers/oai-r.png"
|
||||
: "/providers/oai-cc.png";
|
||||
if (isAnthropicCompatible) return "/providers/anthropic-m.png";
|
||||
return `/providers/${provider.id}.png`;
|
||||
return getProviderIconSrc(provider.id);
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user