tui: display 'Free' label for OpenCode models instead of styled component

Simplifies the model selection UI by rendering the free label as plain text rather than a styled span component, reducing unnecessary markup while maintaining clarity about model pricing.
This commit is contained in:
Dax Raad 2025-11-21 00:18:22 -05:00
parent 8eedd6aa07
commit 1b121ee702
2 changed files with 4 additions and 5 deletions

View file

@ -9,7 +9,7 @@ import { createDialogProviderOptions, DialogProvider } from "./dialog-provider"
function Free() {
const { theme } = useTheme()
return <span style={{ fg: theme.secondary }}>Free</span>
return <span style={{ fg: theme.text }}>Free</span>
}
const PROVIDER_PRIORITY: Record<string, number> = {
opencode: 0,
@ -52,7 +52,7 @@ export function DialogModel() {
title: model.name ?? item.modelID,
description: provider.name,
category: "Recent",
footer: model.cost?.input === 0 && provider.id === "opencode" ? <Free /> : undefined,
footer: model.cost?.input === 0 && provider.id === "opencode" ? "Free" : undefined,
onSelect: () => {
dialog.clear()
local.model.set(
@ -83,9 +83,9 @@ export function DialogModel() {
modelID: model,
},
title: info.name ?? model,
description: provider.name,
description: connected() ? provider.name : undefined,
category: connected() ? provider.name : undefined,
footer: info.cost?.input === 0 && provider.id === "opencode" ? <Free /> : undefined,
footer: info.cost?.input === 0 && provider.id === "opencode" ? "Free" : undefined,
onSelect() {
dialog.clear()
local.model.set(

View file

@ -51,7 +51,6 @@ export function createDialogProviderOptions() {
options={methods.map((x, index) => ({
title: x.label,
value: index,
category: "Method",
}))}
onSelect={(option) => resolve(option.value)}
/>