misc: provider icons, tooltip in chat toolbar, conditionally display the "Open Skills Folder" button and update "Documentation" to "Website" in settings (#60)

This commit is contained in:
Felix
2026-02-12 11:11:28 +08:00
committed by GitHub
Unverified
parent 2ae4201639
commit 8ab1b3af36
26 changed files with 206 additions and 82 deletions

View File

@@ -53,6 +53,8 @@ export interface ProviderTypeInfo {
defaultModelId?: string;
}
import { providerIcons } from '@/assets/providers';
/** All supported provider types with UI metadata */
export const PROVIDER_TYPE_INFO: ProviderTypeInfo[] = [
{ id: 'anthropic', name: 'Anthropic', icon: '🤖', placeholder: 'sk-ant-api03-...', model: 'Claude', requiresApiKey: true },
@@ -65,6 +67,16 @@ export const PROVIDER_TYPE_INFO: ProviderTypeInfo[] = [
{ id: 'custom', name: 'Custom', icon: '⚙️', placeholder: 'API key...', requiresApiKey: true, showBaseUrl: true, showModelId: true, modelIdPlaceholder: 'your-provider/model-id' },
];
/** Get the SVG logo URL for a provider type, falls back to undefined */
export function getProviderIconUrl(type: ProviderType | string): string | undefined {
return providerIcons[type];
}
/** Whether a provider's logo needs CSS invert in dark mode (all logos are monochrome) */
export function shouldInvertInDark(_type: ProviderType | string): boolean {
return true;
}
/** Provider list shown in the Setup wizard */
export const SETUP_PROVIDERS = PROVIDER_TYPE_INFO;