@@ -6,15 +6,11 @@ import { useDialog } from "@opencode/ui/context/dialog" |
6 | 6 | import { Icon } from "@opencode/ui/icon" |
7 | 7 | import { Keybind } from "@opencode/ui/keybind" |
8 | 8 | import { Slash } from "@opencode/ui/slash" |
9 | | -import { consoleModelGroup } from "@/providers/models/provider-group" |
10 | | -import { consoleProviderName } from "@/providers/catalog/console" |
11 | 9 | import { Tooltip } from "@opencode/ui/tooltip" |
12 | 10 | import { ComposerEditor } from "./editor/editor" |
13 | 11 | import { DialogSelectModel, ModelSelectorDrawer } from "@/providers/models/select-dialog" |
14 | 12 | import { DialogSelectModelNext, ModelSelectorDrawerNext } from "@/providers/models/select-dialog-next" |
15 | 13 | import { useSettings } from "@/settings/model" |
16 | | -import { ModelDetails } from "@/providers/models/details" |
17 | | -import { createModelUsage } from "@/usage/model" |
18 | 14 | import { DialogSelectModelUnpaid } from "@/providers/models/unpaid" |
19 | 15 | import { formatKeybind, useCommand } from "@/shell/commands/command" |
20 | 16 | import { useLanguage } from "@/runtime/i18n/language" |
@@ -95,8 +91,6 @@ function ComposerModelControl(props: { |
95 | 91 | const mobile = createMediaQuery("(max-width: 767px)") |
96 | 92 | const dialog = useDialog() |
97 | 93 | const settings = useSettings() |
98 | | - const managed = createMemo(() => consoleModelGroup(props.model.list())) |
99 | | - const usage = createModelUsage() |
100 | 94 |
|
101 | 95 | const open = (detail: number) => { |
102 | 96 | if (!props.paid) return props.onUnpaidClick() |
@@ -117,14 +111,6 @@ function ComposerModelControl(props: { |
117 | 111 | open(detail) |
118 | 112 | }) |
119 | 113 |
|
120 | | - const providerName = (provider: { id: string; name: string }) => { |
121 | | - const group = managed() |
122 | | - |
123 | | - return group?.providers.some((item) => item.id === provider.id) |
124 | | - ? consoleProviderName(group, provider.name) |
125 | | - : provider.name |
126 | | - } |
127 | | - |
128 | 114 | const content = () => ( |
129 | 115 | <> |
130 | 116 | <span class="flex min-w-0 whitespace-nowrap leading-4"> |
@@ -149,30 +135,12 @@ function ComposerModelControl(props: { |
149 | 135 | <Show when={!props.loading || props.preview}> |
150 | 136 | <Tooltip |
151 | 137 | inactive={mobile()} |
152 | | - openDelay={750} |
153 | | - contentClass={props.model.current() ? "!p-0 rounded-md" : undefined} |
154 | 138 | placement="top" |
155 | | - gutter={4} |
156 | 139 | value={ |
157 | | - <Show |
158 | | - when={props.model.current()} |
159 | | - fallback={ |
160 | | - <> |
161 | | - {props.title} |
162 | | - <Keybind keys={props.keybind} variant="neutral" /> |
163 | | - </> |
164 | | - } |
165 | | - > |
166 | | - {(model) => ( |
167 | | - <div class="flex w-[188px] max-w-[calc(100vw-24px)] flex-col"> |
168 | | - <ModelDetails model={model()} provider={providerName(model().provider)} usage={usage(model())} /> |
169 | | - <div class="flex h-7 min-w-0 items-center gap-2 border-t-[0.5px] border-v2-border-border-base px-2"> |
170 | | - <span class="min-w-0 flex-1 truncate text-v2-text-text-faint">{props.title}</span> |
171 | | - <Keybind keys={props.keybind} variant="neutral" /> |
172 | | - </div> |
173 | | - </div> |
174 | | - )} |
175 | | - </Show> |
| 140 | + <> |
| 141 | + {props.title} |
| 142 | + <Keybind keys={props.keybind} variant="neutral" /> |
| 143 | + </> |
176 | 144 | } |
177 | 145 | > |
178 | 146 | {/* While loading, the drawer would open on a catalog that isn't there yet, so the inert chip stands in. */} |
|