diff --git a/packages/ui/src/components/ui/ContextUsageDisplay.tsx b/packages/ui/src/components/ui/ContextUsageDisplay.tsx index 545ffbd8..ddb3c75f 100644 --- a/packages/ui/src/components/ui/ContextUsageDisplay.tsx +++ b/packages/ui/src/components/ui/ContextUsageDisplay.tsx @@ -24,7 +24,6 @@ export const ContextUsageDisplay: React.FC = ({ hideIcon = false, }) => { const [mobileTooltipOpen, setMobileTooltipOpen] = React.useState(false); - const longPressTimerRef = React.useRef(undefined); const formatTokens = (tokens: number) => { if (tokens >= 1_000_000) { @@ -49,29 +48,6 @@ export const ContextUsageDisplay: React.FC = ({ `Output limit: ${formatTokens(safeOutputLimit)}`, ]; - const handleLongPressStart = React.useCallback(() => { - if (longPressTimerRef.current) { - clearTimeout(longPressTimerRef.current); - } - longPressTimerRef.current = setTimeout(() => { - setMobileTooltipOpen(true); - }, 500); - }, []); - - const handleLongPressEnd = React.useCallback(() => { - if (longPressTimerRef.current) { - clearTimeout(longPressTimerRef.current); - } - }, []); - - React.useEffect(() => { - return () => { - if (longPressTimerRef.current) { - clearTimeout(longPressTimerRef.current); - } - }; - }, []); - const contextElement = (
= ({ size === 'compact' ? 'typography-micro' : 'typography-meta', )} aria-label="Context usage" - onTouchStart={isMobile ? handleLongPressStart : undefined} - onTouchEnd={isMobile ? handleLongPressEnd : undefined} + onClick={isMobile ? () => setMobileTooltipOpen(true) : undefined} > {!isMobile && !hideIcon && }