Skip to content

Commit 44c49d3

Browse files
committed
fix(web): hovering a model name shows its full name and slug
1 parent 11bf4d8 commit 44c49d3

1 file changed

Lines changed: 18 additions & 8 deletions

File tree

‎apps/web/src/components/settings/ProviderModelsSection.tsx‎

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -505,14 +505,24 @@ function ProviderModelRow({
505505
The name never shrinks, so the slug truncates first. The wrapper is the
506506
only part that shrinks, which keeps the "custom" label out of the next column.
507507
*/}
508-
<span className="flex min-w-0 items-baseline gap-2 overflow-hidden">
509-
<span className={cn(nameClassName, "max-w-full shrink-0 truncate")}>{model.name}</span>
510-
{model.name !== model.slug ? (
511-
<code className="truncate font-mono text-2xs text-muted-foreground/70">
512-
{model.slug}
513-
</code>
514-
) : null}
515-
</span>
508+
<Tooltip>
509+
<TooltipTrigger
510+
render={<span className="flex min-w-0 items-baseline gap-2 overflow-hidden" />}
511+
>
512+
<span className={cn(nameClassName, "max-w-full shrink-0 truncate")}>{model.name}</span>
513+
{model.name !== model.slug ? (
514+
<code className="truncate font-mono text-2xs text-muted-foreground/70">
515+
{model.slug}
516+
</code>
517+
) : null}
518+
</TooltipTrigger>
519+
<TooltipPopup side="top" align="start">
520+
<div>{model.name}</div>
521+
{model.name !== model.slug ? (
522+
<code className="font-mono text-2xs text-muted-foreground">{model.slug}</code>
523+
) : null}
524+
</TooltipPopup>
525+
</Tooltip>
516526
{model.isCustom ? (
517527
<span className="shrink-0 text-2xs text-muted-foreground/70">custom</span>
518528
) : null}

0 commit comments

Comments
 (0)