|
10 | 10 | class="h-6 px-2 gap-1 text-xs text-muted-foreground hover:text-foreground backdrop-blur-lg" |
11 | 11 | > |
12 | 12 | <ModelIcon |
13 | | - :model-id="displayProviderId" |
| 13 | + :model-id="displayIconId" |
14 | 14 | custom-class="w-3.5 h-3.5" |
15 | 15 | :is-dark="themeStore.isDark" |
16 | 16 | /> |
|
25 | 25 | @click="selectModel(group.providerId, group.model.id)" |
26 | 26 | > |
27 | 27 | <ModelIcon |
28 | | - :model-id="group.providerId" |
| 28 | + :model-id="resolveModelIconId(group.providerId, group.model.id)" |
29 | 29 | custom-class="w-3.5 h-3.5" |
30 | 30 | :is-dark="themeStore.isDark" |
31 | 31 | /> |
|
42 | 42 | :disabled="true" |
43 | 43 | > |
44 | 44 | <ModelIcon |
45 | | - :model-id="displayProviderId" |
| 45 | + :model-id="displayIconId" |
46 | 46 | custom-class="w-3.5 h-3.5" |
47 | 47 | :is-dark="themeStore.isDark" |
48 | 48 | /> |
@@ -635,18 +635,27 @@ watch( |
635 | 635 | { immediate: true } |
636 | 636 | ) |
637 | 637 |
|
638 | | -const displayProviderId = computed(() => { |
| 638 | +const resolveModelIconId = (providerId?: string | null, modelId?: string | null): string => { |
| 639 | + if (providerId === 'acp' && modelId) { |
| 640 | + return modelId |
| 641 | + } |
| 642 | + return providerId || 'anthropic' |
| 643 | +} |
| 644 | +
|
| 645 | +const displayIconId = computed(() => { |
639 | 646 | if (hasActiveSession.value) { |
640 | | - return ( |
641 | | - activeSessionSelection.value?.providerId || |
642 | | - draftModelSelection.value?.providerId || |
643 | | - 'anthropic' |
| 647 | + return resolveModelIconId( |
| 648 | + activeSessionSelection.value?.providerId || draftModelSelection.value?.providerId, |
| 649 | + activeSessionSelection.value?.modelId || draftModelSelection.value?.modelId |
644 | 650 | ) |
645 | 651 | } |
646 | 652 | if (isAcpAgent.value) { |
647 | | - return agentStore.selectedAgentId ?? 'acp' |
| 653 | + return resolveModelIconId('acp', agentStore.selectedAgentId) |
648 | 654 | } |
649 | | - return draftModelSelection.value?.providerId || 'anthropic' |
| 655 | + return resolveModelIconId( |
| 656 | + draftModelSelection.value?.providerId, |
| 657 | + draftModelSelection.value?.modelId |
| 658 | + ) |
650 | 659 | }) |
651 | 660 |
|
652 | 661 | const displayModelName = computed(() => { |
|
0 commit comments