feat(ui): improve API profile provider selector UX

This commit is contained in:
Tam Nhu Tran committed 2026-03-17 13:54:52 -04:00
1 parent eeb0378054
commit 0337a32d99
6 files changed
+260 -84

No files matched your search

+9
View File
@@ -61,6 +61,15 @@ describe('provider-presets', () => {
expect(preset?.defaultProfileName).toBe('qwen-api');
});
it('keeps Anthropic direct last in the recommended preset order and reuses the Claude logo', () => {
const recommendedPresetIds = PROVIDER_PRESETS.filter(
(preset) => preset.category === 'recommended'
).map((preset) => preset.id);
expect(recommendedPresetIds.at(-1)).toBe('anthropic');
expect(getPresetById('anthropic')?.icon).toBe('/assets/providers/claude.svg');
});
it('only references provider preset icons that exist in ui/public', () => {
for (const preset of PROVIDER_PRESETS) {
if (!preset.icon) continue;