diff --git a/packages/ui/src/components/chat/ModelControls.tsx b/packages/ui/src/components/chat/ModelControls.tsx index 476a2e61..4dc8117f 100644 --- a/packages/ui/src/components/chat/ModelControls.tsx +++ b/packages/ui/src/components/chat/ModelControls.tsx @@ -522,7 +522,7 @@ export const ModelControls: React.FC = ({ // currentProviderId/currentModelId; include providers to avoid stale variants. const availableVariants = React.useMemo(() => { return getCurrentModelVariants(); - }, [getCurrentModelVariants, currentProviderId, currentModelId, providers]); + }, [getCurrentModelVariants]); const hasVariants = availableVariants.length > 0; const costRows = [ diff --git a/packages/ui/src/components/views/FilesView.tsx b/packages/ui/src/components/views/FilesView.tsx index 6545ca63..83849d1f 100644 --- a/packages/ui/src/components/views/FilesView.tsx +++ b/packages/ui/src/components/views/FilesView.tsx @@ -56,7 +56,6 @@ import { import { useDebouncedValue } from '@/hooks/useDebouncedValue'; import { useFileSearchStore } from '@/stores/useFileSearchStore'; import { useDeviceInfo } from '@/lib/device'; -import { useLongPress } from '@/hooks/useLongPress'; import { cn, getModifierLabel, hasModifier } from '@/lib/utils'; import { getLanguageFromExtension, getImageMimeType, isImageFile } from '@/lib/toolHelpers'; import { useRuntimeAPIs } from '@/hooks/useRuntimeAPIs'; @@ -427,16 +426,10 @@ const FileRow: React.FC = ({ } }, [isDir, node, onSelect, onToggle]); - const longPressHandlers = useLongPress({ - onLongPress: handleContextMenu, - onTap: handleInteraction, - enableHaptic: true, - }); - - const interactionProps = isMobile ? longPressHandlers : { - onClick: handleInteraction, - onContextMenu: handleContextMenu, - }; + const handleMenuButtonClick = React.useCallback((event: React.MouseEvent) => { + event.stopPropagation(); + setContextMenuPath(node.path); + }, [node.path, setContextMenuPath]); return (
= ({ > {(canRename || canCreateFile || canCreateFolder || canDelete) && (
setContextMenuPath(open ? node.path : null)} > - {!isMobile && ( - - - - )} - {isMobile && ( - - - - )} - setContextMenuPath(null)}> + + + + setContextMenuPath(null)}> {canRename && ( { e.stopPropagation(); onOpenDialog('rename', node); }}> Rename