refactor(agents): move transcript context toggle styling into shared variants

- Add an xs size variant to the shared Toggle component for compact pill-style controls.
- Update the outline toggle variant so pressed state uses the muted visual treatment instead of the primary fill.
- Simplify the agent transcript context toggle to use size="xs" and remove the visible context section count.
This commit is contained in:
Taylor Ho
2026-06-14 23:53:35 -07:00
parent 558d8420d7
commit b839af2fe6
2 changed files with 4 additions and 6 deletions
@@ -608,17 +608,13 @@ function TurnSetupFooter({
{showContext ? (
<Toggle
aria-label={`${contextOpen ? "Hide" : "Show"} prompt context`}
className="h-5 min-h-0 min-w-0 gap-1 rounded-md px-1.5 text-xs font-medium data-[state=on]:bg-muted data-[state=on]:text-foreground"
data-testid="transcript-prompt-context-toggle"
onPressedChange={onContextOpenChange}
pressed={contextOpen}
size="sm"
size="xs"
variant="outline"
>
Context
<span className="text-muted-foreground/70">
{context.sections.length}
</span>
</Toggle>
) : null}
<TranscriptTimestamp timestamp={timestamp} />
+3 -1
View File
@@ -10,10 +10,12 @@ const toggleVariants = cva(
variants: {
variant: {
default: "bg-transparent",
outline: "border border-input/40 bg-background hover:bg-muted/70",
outline:
"border border-input/40 bg-background hover:bg-muted/70 data-[state=on]:bg-muted data-[state=on]:text-foreground",
},
size: {
default: "h-9 px-3 min-w-9",
xs: "h-5 min-h-0 min-w-0 gap-1 rounded-md px-1.5 text-xs font-medium",
sm: "h-8 px-2 min-w-8",
lg: "h-10 px-3 min-w-10",
},