diff --git a/desktop/src/components/controls/ReasoningEffortPopover.test.tsx b/desktop/src/components/controls/ReasoningEffortPopover.test.tsx index 09ef39c8..10cf4d13 100644 --- a/desktop/src/components/controls/ReasoningEffortPopover.test.tsx +++ b/desktop/src/components/controls/ReasoningEffortPopover.test.tsx @@ -44,16 +44,16 @@ describe('ReasoningEffortPopover', () => { renderPopover() const popover = screen.getByTestId('reasoning-effort-popover') - expect(popover).toHaveStyle({ width: '280px' }) - expect(popover).toHaveClass('px-4', 'pb-4', 'pt-3.5') + expect(popover).toHaveStyle({ width: '240px' }) + expect(popover).toHaveClass('px-3.5', 'pb-3.5', 'pt-3') expect(popover.querySelectorAll('svg')).toHaveLength(0) - expect(screen.getByTestId('reasoning-effort-header')).toHaveClass('mb-3', 'justify-between') - expect(screen.getByTestId('reasoning-effort-label')).toHaveClass('text-[15px]') - expect(screen.getByTestId('reasoning-effort-context-label')).toHaveClass('text-[11px]') + expect(screen.getByTestId('reasoning-effort-header')).toHaveClass('mb-2.5', 'justify-between') + expect(screen.getByTestId('reasoning-effort-label')).toHaveClass('text-sm') + expect(screen.getByTestId('reasoning-effort-context-label')).toHaveClass('text-[10px]') expect(screen.getByTestId('reasoning-effort-context-label')).toHaveTextContent('推理强度') - expect(screen.getByRole('slider', { name: '推理强度' })).toHaveClass('h-11') - expect(screen.getByTestId('reasoning-effort-track')).toHaveClass('h-[30px]') - expect(screen.getByTestId('reasoning-effort-thumb')).toHaveClass('h-10', 'w-10') + expect(screen.getByRole('slider', { name: '推理强度' })).toHaveClass('h-9') + expect(screen.getByTestId('reasoning-effort-track')).toHaveClass('h-6') + expect(screen.getByTestId('reasoning-effort-thumb')).toHaveClass('h-8', 'w-8') }) it('renders every model-supported stop and exposes the selected localized value', () => { diff --git a/desktop/src/components/controls/ReasoningEffortPopover.tsx b/desktop/src/components/controls/ReasoningEffortPopover.tsx index cfaf3cd9..c87666d0 100644 --- a/desktop/src/components/controls/ReasoningEffortPopover.tsx +++ b/desktop/src/components/controls/ReasoningEffortPopover.tsx @@ -20,7 +20,7 @@ type PopoverPosition = { width: number } -const POPOVER_WIDTH = 280 +const POPOVER_WIDTH = 240 const VIEWPORT_MARGIN = 16 const POPOVER_GAP = 10 @@ -107,22 +107,22 @@ export function ReasoningEffortPopover({