diff --git a/desktop/src/components/controls/ReasoningEffortPopover.test.tsx b/desktop/src/components/controls/ReasoningEffortPopover.test.tsx index 3808291b..3896960c 100644 --- a/desktop/src/components/controls/ReasoningEffortPopover.test.tsx +++ b/desktop/src/components/controls/ReasoningEffortPopover.test.tsx @@ -40,6 +40,19 @@ function renderPopover(overrides: Partial { + it('keeps the effort visual compact without non-functional icon controls', () => { + 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.querySelectorAll('svg')).toHaveLength(0) + expect(screen.getByTestId('reasoning-effort-label')).toHaveClass('mb-3', 'text-[15px]') + 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') + }) + it('renders every model-supported stop and exposes the selected localized value', () => { renderPopover() diff --git a/desktop/src/components/controls/ReasoningEffortPopover.tsx b/desktop/src/components/controls/ReasoningEffortPopover.tsx index 3302cbcd..c26dff8f 100644 --- a/desktop/src/components/controls/ReasoningEffortPopover.tsx +++ b/desktop/src/components/controls/ReasoningEffortPopover.tsx @@ -1,6 +1,5 @@ import { useEffect, useLayoutEffect, useRef, useState } from 'react' import { createPortal } from 'react-dom' -import { ChevronRight, Zap } from 'lucide-react' import type { ReasoningEffortLevel } from '../../types/settings' @@ -21,7 +20,7 @@ type PopoverPosition = { width: number } -const POPOVER_WIDTH = 360 +const POPOVER_WIDTH = 280 const VIEWPORT_MARGIN = 16 const POPOVER_GAP = 10 @@ -108,15 +107,14 @@ export function ReasoningEffortPopover({
-
-
- {labels[value]} -
-