Skip to content

Commit 905b9fd

Browse files
committed
fix(opencode): PlatformTypeBadge no longer falls back to Gemini label
PlatformTypeBadge defaulted unknown platforms to 'Gemini', so opencode accounts rendered as Gemini in the admin account list. Add explicit opencode label (OpenCode Go) + teal badge class; also add opencode to platformColors.platformLabel and ProxiesView probe-target label.
1 parent 0e58c00 commit 905b9fd

3 files changed

Lines changed: 13 additions & 6 deletions

File tree

‎frontend/src/components/common/PlatformTypeBadge.vue‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ const platformLabel = computed(() => {
9090
if (props.platform === 'openai') return 'OpenAI'
9191
if (props.platform === 'antigravity') return 'Antigravity'
9292
if (props.platform === 'grok') return 'Grok'
93+
if (props.platform === 'opencode') return 'OpenCode Go'
9394
return 'Gemini'
9495
})
9596
@@ -180,6 +181,9 @@ const platformClass = computed(() => {
180181
if (props.platform === 'grok') {
181182
return 'bg-zinc-100 text-zinc-700 dark:bg-zinc-800 dark:text-zinc-300'
182183
}
184+
if (props.platform === 'opencode') {
185+
return 'bg-teal-100 text-teal-700 dark:bg-teal-900/30 dark:text-teal-400'
186+
}
183187
return 'bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400'
184188
})
185189

‎frontend/src/utils/platformColors.ts‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,9 @@ export function platformLabel(p: string): string {
226226
case 'openai': return 'OpenAI'
227227
case 'antigravity': return 'Antigravity'
228228
case 'gemini': return 'Gemini'
229-
case 'grok': return 'Grok'
230-
case 'composite': return 'Composite'
229+
case 'grok': return 'Grok'
230+
case 'opencode': return 'OpenCode Go'
231+
case 'composite': return 'Composite'
231232
default: return p || 'API'
232233
}
233234
}

‎frontend/src/views/admin/ProxiesView.vue‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1777,10 +1777,12 @@ const qualityTargetLabel = (target: string) => {
17771777
return 'Anthropic'
17781778
case 'gemini':
17791779
return 'Gemini'
1780-
case 'grok':
1781-
return 'Grok'
1782-
default:
1783-
return target
1780+
case 'grok':
1781+
return 'Grok'
1782+
case 'opencode':
1783+
return 'OpenCode Go'
1784+
default:
1785+
return target
17841786
}
17851787
}
17861788

0 commit comments

Comments
 (0)