Skip to content
This repository was archived by the owner on Apr 1, 2026. It is now read-only.

Commit 3f59570

Browse files
committed
fix: add null check
1 parent 304e956 commit 3f59570

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

packages/opencode/src/cli/cmd/tui/component/dialog-model.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export function DialogModel() {
3636
title: model.name ?? item.modelID,
3737
description: provider.name,
3838
category: "Recent",
39-
footer: model.cost.input === 0 && provider.id === "opencode" ? <Free /> : undefined,
39+
footer: model.cost?.input === 0 && provider.id === "opencode" ? <Free /> : undefined,
4040
},
4141
]
4242
})
@@ -59,7 +59,7 @@ export function DialogModel() {
5959
title: info.name ?? model,
6060
description: provider.name,
6161
category: provider.name,
62-
footer: info.cost.input === 0 && provider.id === "opencode" ? <Free /> : undefined,
62+
footer: info.cost?.input === 0 && provider.id === "opencode" ? <Free /> : undefined,
6363
})),
6464
filter((x) => Boolean(ref()?.filter) || !local.model.recent().find((y) => isDeepEqual(y, x.value))),
6565
),

0 commit comments

Comments
 (0)