Skip to content

Commit d5bee9e

Browse files
opencode-agent[bot]iamdavidhillHona
authored
fix(app): remove context tab indicator tooltip (anomalyco#59505)
Co-authored-by: iamdavidhill <1879069+iamdavidhill@users.noreply.github.com> Co-authored-by: Luke Parker <10430890+Hona@users.noreply.github.com>
1 parent 2273b60 commit d5bee9e

1 file changed

Lines changed: 9 additions & 31 deletions

File tree

‎packages/gui-plugins/src/context/indicator.tsx‎

Lines changed: 9 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@ import { lastAssistantWithUsage } from "@opencode/client/solid"
88
import { usePlugin, type MountedSession } from "@opencode/plugin/gui"
99
import { catalogModel, syncCatalog } from "./catalog"
1010

11-
function ContextTooltipRow(props: { name: JSX.Element; value: JSX.Element }) {
12-
return (
13-
<div class="flex min-w-0 items-center gap-4">
14-
<span class="shrink-0 text-v2-text-text-muted">{props.name}</span>
15-
<span class="ml-auto min-w-0 truncate text-right text-v2-text-text-base">{props.value}</span>
16-
</div>
17-
)
18-
}
19-
2011
export function SessionContextUsage(props: {
2112
session: MountedSession
2213
/** False while the session's view is detached; it loads nothing until selected again. */
@@ -126,16 +117,6 @@ export function SessionContextUsage(props: {
126117
</div>
127118
)
128119

129-
const tooltipValue = () => (
130-
<div class="flex w-[120px] flex-col gap-2">
131-
<Show when={showCost()}>
132-
<ContextTooltipRow name={ctx.t("usage.cost")} value={cost()} />
133-
</Show>
134-
<ContextTooltipRow name={ctx.t("usage.usage")} value={`${context()?.usage ?? 0}%`} />
135-
<ContextTooltipRow name={ctx.t("usage.tokens")} value={context()?.total.toLocaleString(i18n.locale()) ?? "0"} />
136-
</div>
137-
)
138-
139120
const menuRow = (name: JSX.Element, value: JSX.Element) => (
140121
<div class="flex h-7 min-w-0 items-center gap-4 px-3 text-[13px] font-[440] leading-[var(--line-height-compact)] tracking-[-0.04px]">
141122
<span class="shrink-0 text-v2-text-text-muted">{name}</span>
@@ -172,13 +153,10 @@ export function SessionContextUsage(props: {
172153
return (
173154
<Show when={props.session.id}>
174155
<Show when={!props.compact} fallback={usageMenu()}>
175-
<Tooltip
176-
value={variant() === "indicator" ? tooltipValue() : ctx.t("usage.toggle")}
177-
placement={props.placement ?? "top"}
178-
>
179-
<Show
180-
when={variant() === "indicator"}
181-
fallback={
156+
<Show
157+
when={variant() === "indicator"}
158+
fallback={
159+
<Tooltip value={ctx.t("usage.toggle")} placement={props.placement ?? "top"}>
182160
<Button
183161
type="button"
184162
variant="ghost-muted"
@@ -199,11 +177,11 @@ export function SessionContextUsage(props: {
199177
</Show>
200178
</span>
201179
</Button>
202-
}
203-
>
204-
{circle()}
205-
</Show>
206-
</Tooltip>
180+
</Tooltip>
181+
}
182+
>
183+
{circle()}
184+
</Show>
207185
</Show>
208186
</Show>
209187
)

0 commit comments

Comments
 (0)