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

Commit c0e161a

Browse files
[fix/feat:ui] Show default option badge (pingdotgg#3232)
Co-authored-by: Julius Marminge <[email protected]>
1 parent d0b9f8d commit c0e161a

1 file changed

Lines changed: 18 additions & 1 deletion

File tree

‎apps/web/src/components/chat/TraitsPicker.tsx‎

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {
3030
import { useComposerDraftStore, DraftId } from "../../composerDraftStore";
3131
import { getProviderModelCapabilities } from "../../providerModels";
3232
import { cn } from "~/lib/utils";
33+
import { Badge } from "../ui/badge";
3334

3435
type ProviderOptions = ReadonlyArray<ProviderOptionSelection>;
3536

@@ -46,6 +47,17 @@ type TraitsPersistence =
4647

4748
const ULTRATHINK_PROMPT_PREFIX = "Ultrathink:\n";
4849

50+
function DefaultBadge() {
51+
return (
52+
<Badge
53+
variant="outline"
54+
className="inline-flex h-4 w-fit min-w-0 items-center justify-center gap-0 border-border/70 bg-muted/60 px-1.5 py-0 font-semibold text-[10px] text-muted-foreground leading-none sm:h-4"
55+
>
56+
Default
57+
</Badge>
58+
);
59+
}
60+
4961
function replaceDescriptorCurrentValue(
5062
descriptors: ReadonlyArray<ProviderOptionDescriptor>,
5163
descriptorId: string,
@@ -313,7 +325,12 @@ export const TraitsMenuContent = memo(function TraitsMenuContentImpl({
313325
disabled={ultrathinkInBodyText && descriptor.id === primarySelectDescriptor?.id}
314326
>
315327
{option.label}
316-
{option.isDefault ? " (default)" : ""}
328+
{option.isDefault ? (
329+
<>
330+
{" "}
331+
<DefaultBadge />
332+
</>
333+
) : null}
317334
</MenuRadioItem>
318335
))}
319336
</MenuRadioGroup>

0 commit comments

Comments
 (0)