diff --git a/src/shared/provider-preset-catalog.ts b/src/shared/provider-preset-catalog.ts index 52f0eedc..551e3a4d 100644 --- a/src/shared/provider-preset-catalog.ts +++ b/src/shared/provider-preset-catalog.ts @@ -77,7 +77,7 @@ const RAW_PROVIDER_PRESET_DEFINITIONS: readonly ProviderPresetDefinition[] = [ name: 'Alibaba Coding Plan', description: 'Alibaba Cloud Coding Plan via Anthropic-compatible endpoint', baseUrl: 'https://coding-intl.dashscope.aliyuncs.com/apps/anthropic', - defaultProfileName: 'alibaba-plan', + defaultProfileName: 'albb', defaultModel: 'qwen3-coder-plus', apiKeyPlaceholder: 'sk-sp-...', apiKeyHint: 'Get your Coding Plan key from Alibaba Cloud Model Studio', diff --git a/tests/unit/api/provider-presets.test.ts b/tests/unit/api/provider-presets.test.ts index 4b7c2355..1235088f 100644 --- a/tests/unit/api/provider-presets.test.ts +++ b/tests/unit/api/provider-presets.test.ts @@ -6,7 +6,7 @@ describe('provider-presets', () => { const preset = getPresetById('alibaba-coding-plan'); expect(preset?.id).toBe('alibaba-coding-plan'); expect(preset?.baseUrl).toBe('https://coding-intl.dashscope.aliyuncs.com/apps/anthropic'); - expect(preset?.defaultProfileName).toBe('alibaba-plan'); + expect(preset?.defaultProfileName).toBe('albb'); }); it('resolves alibaba alias to Alibaba Coding Plan preset', () => { diff --git a/ui/src/components/layout/app-sidebar.tsx b/ui/src/components/layout/app-sidebar.tsx index b3479645..91ee0c12 100644 --- a/ui/src/components/layout/app-sidebar.tsx +++ b/ui/src/components/layout/app-sidebar.tsx @@ -36,10 +36,12 @@ import { useCliproxyUpdateCheck } from '@/hooks/use-cliproxy'; import { Collapsible, CollapsibleContent, CollapsibleTrigger } from '@/components/ui/collapsible'; import { Tooltip, TooltipContent, TooltipTrigger } from '@/components/ui/tooltip'; import { useTranslation } from 'react-i18next'; +import { cn } from '@/lib/utils'; interface SidebarBadge { - text: string; - icon: string; + icon?: string; + icons?: string[]; + text?: string; } interface SidebarChildItem { @@ -79,7 +81,13 @@ function buildNavGroups(t: (key: string) => string): SidebarGroupDef[] { path: '/providers', icon: Key, label: t('nav.apiProfiles'), - badge: { text: 'Featured', icon: '/icons/openrouter.svg' }, + badge: { + icons: [ + '/icons/openrouter.svg', + '/assets/providers/alibabacloud-color.svg', + '/icons/ollama.svg', + ], + }, }, { path: '/cliproxy', @@ -229,14 +237,38 @@ export function AppSidebar() { - - {item.badge.text} + {(item.badge.icons && item.badge.icons.length > 0 + ? item.badge.icons + : item.badge.icon + ? [item.badge.icon] + : [] + ).map((iconPath) => ( + + + + ))} + {item.badge.text && ( + {item.badge.text} + )} diff --git a/ui/src/lib/i18n.ts b/ui/src/lib/i18n.ts index 41f1268c..3d72b140 100644 --- a/ui/src/lib/i18n.ts +++ b/ui/src/lib/i18n.ts @@ -32,7 +32,7 @@ const resources = { system: 'System', health: 'Health', settings: 'Settings', - openrouterTooltip: 'Featured: OpenRouter + Alibaba Coding Plan', + openrouterTooltip: 'Featured: OpenRouter + Alibaba Coding Plan + Ollama', }, home: { profiles: 'Profiles', @@ -1179,7 +1179,7 @@ const resources = { system: '系统', health: '健康', settings: '设置', - openrouterTooltip: '精选:OpenRouter + Alibaba Coding Plan', + openrouterTooltip: '精选:OpenRouter + Alibaba Coding Plan + Ollama', }, home: { profiles: '配置', @@ -2283,7 +2283,7 @@ const resources = { system: 'Hệ thống', health: 'Sức khỏe', settings: 'Cài đặt', - openrouterTooltip: 'Nổi bật: OpenRouter + Alibaba Coding Plan', + openrouterTooltip: 'Nổi bật: OpenRouter + Alibaba Coding Plan + Ollama', }, home: { profiles: 'Hồ sơ',