Skip to content

Commit 96a0f3d

Browse files
committed
fix(tui): show model display names
1 parent 6e387f5 commit 96a0f3d

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

packages/opencode/src/kilocode/plugins/sidebar-usage.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import type { TuiPlugin, TuiPluginApi, TuiPluginModule } from "@kilocode/plugin/tui"
22
import { createMemo, createResource, For, onCleanup, onMount, Show } from "solid-js"
33
import { useLocal } from "@tui/context/local"
4+
import * as Model from "@tui/util/model"
45
import { fmtAttemptCost, fmtScore } from "@/kilocode/components/model-info-panel-utils"
56
import {
67
failed,
@@ -28,6 +29,7 @@ function View(props: { api: TuiPluginApi; session_id: string }) {
2829
)
2930
const usage = createMemo(() => select(result(), props.session_id))
3031
const unavailable = createMemo(() => failed(result(), props.session_id))
32+
const providers = createMemo(() => Model.index([...props.api.state.provider]))
3133
const groups = createMemo(() => groupModelsByProvider(usage()?.models ?? [], props.api.state.provider))
3234
const bench = createMemo(() => {
3335
const current = local.model.current()
@@ -122,7 +124,7 @@ function View(props: { api: TuiPluginApi; session_id: string }) {
122124
{(model) => (
123125
<box>
124126
<text fg={theme().text} wrapMode="char">
125-
<b>{model.modelID}</b>
127+
<b>{Model.name(providers(), model.providerID, model.modelID)}</b>
126128
</text>
127129
<text fg={theme().textMuted} wrapMode="word">
128130
Steps {formatCount(model.steps)} | Cost {formatCost(model.cost)}

0 commit comments

Comments
 (0)