diff --git a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/FileGrid.tsx b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/FileGrid.tsx index 6d95ca2d..f69023dd 100644 --- a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/FileGrid.tsx +++ b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/FileGrid.tsx @@ -61,7 +61,6 @@ export const FileGrid = ({ fileBrowserManager }: FileGridProps) => { renamingName, setRenamingName, handleReadAloud, - handleOcr, handleExtract, handlePlay, getMatchingTaskGroups, @@ -178,7 +177,6 @@ export const FileGrid = ({ fileBrowserManager }: FileGridProps) => { forceRename={renamingName === entry.name} onRenamingChange={setRenamingName} onReadAloud={handleReadAloud} - onOcr={handleOcr} onExtract={handleExtract} onPlay={handlePlay} taskGroups={getMatchingTaskGroups(entry.name, entry.type)} diff --git a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/FileItem.tsx b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/FileItem.tsx index 96ac5892..ec11cf2b 100644 --- a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/FileItem.tsx +++ b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/components/FileItem.tsx @@ -12,7 +12,6 @@ import { Download, LayoutGrid, Volume2, - ScanText, FolderArchive, ClipboardCopy, Music, @@ -62,7 +61,6 @@ export type FileItemProps = { forceRename: boolean; onRenamingChange: (name: string | null) => void; onReadAloud: (entry: DirEntry) => void; - onOcr: (entry: DirEntry) => void; onExtract: (entry: DirEntry) => void; onPlay: (entry: DirEntry) => void; taskGroups: TaskGroup[]; @@ -93,7 +91,6 @@ type MenuItemsProps = { onCopyPath: (e: DirEntry) => void; onDownload: (e: DirEntry) => void; onReadAloud: (e: DirEntry) => void; - onOcr: (e: DirEntry) => void; onExtract: (e: DirEntry) => void; onPlay: (e: DirEntry) => void; onCut: () => void; @@ -112,7 +109,6 @@ const DropdownMenuItems = ({ onCopyPath, onDownload, onReadAloud, - onOcr, onExtract, onPlay, onCut, @@ -123,12 +119,11 @@ const DropdownMenuItems = ({ }: MenuItemsProps) => { const fileType = entry.type === 'file' ? getFileType(entry.name) : null; const showReadAloud = fileType === 'markdown' || fileType === 'code' || fileType === 'text'; - const showOcr = fileType === 'image'; const showExtract = fileType === 'archive'; const showPlay = fileType === 'audio' || entry.type === 'directory'; const hasTasks = taskGroups.length > 0; - const hasActions = showPlay || showReadAloud || showOcr || showExtract || hasTasks; + const hasActions = showPlay || showReadAloud || showExtract || hasTasks; // Only nest when more than one category matched — a file usually matches a single category, and // Run Task > Video > Convert would just add a hop. const nestTasks = taskGroups.length > 1; @@ -148,12 +143,6 @@ const DropdownMenuItems = ({ Read Aloud )} - {showOcr && ( - onOcr(entry)} className="cursor-pointer"> - - Extract Text (OCR) - - )} {showExtract && ( onExtract(entry)} className="cursor-pointer"> @@ -248,7 +237,6 @@ const ContextMenuItems = ({ onCopyPath, onDownload, onReadAloud, - onOcr, onExtract, onPlay, onCut, @@ -259,12 +247,11 @@ const ContextMenuItems = ({ }: MenuItemsProps) => { const fileType = entry.type === 'file' ? getFileType(entry.name) : null; const showReadAloud = fileType === 'markdown' || fileType === 'code' || fileType === 'text'; - const showOcr = fileType === 'image'; const showExtract = fileType === 'archive'; const showPlay = fileType === 'audio' || entry.type === 'directory'; const hasTasks = taskGroups.length > 0; - const hasActions = showPlay || showReadAloud || showOcr || showExtract || hasTasks; + const hasActions = showPlay || showReadAloud || showExtract || hasTasks; // Only nest when more than one category matched — a file usually matches a single category, and // Run Task > Video > Convert would just add a hop. const nestTasks = taskGroups.length > 1; @@ -284,12 +271,6 @@ const ContextMenuItems = ({ Read Aloud )} - {showOcr && ( - onOcr(entry)} className="cursor-pointer"> - - Extract Text (OCR) - - )} {showExtract && ( onExtract(entry)} className="cursor-pointer"> @@ -493,7 +474,6 @@ export const FileItem = ({ forceRename, onRenamingChange, onReadAloud, - onOcr, onExtract, onPlay, taskGroups, @@ -574,7 +554,6 @@ export const FileItem = ({ onCopyPath, onDownload, onReadAloud, - onOcr, onExtract, onPlay, onCut, diff --git a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/useFileBrowserApp.ts b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/useFileBrowserApp.ts index dc9f17b5..5afde4b3 100644 --- a/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/useFileBrowserApp.ts +++ b/src/workspaces/officerdev/src/apps/FileBrowser/FileBrowserApp/useFileBrowserApp.ts @@ -444,19 +444,6 @@ export const useFileBrowserApp = ( } }; - const handleOcr = async (entry: DirEntry) => { - const filePath = entryPath(entry.name); - const toastId = toast.loading('Extracting text from image...'); - try { - const { ocrPath } = await files.ocr(filePath, { saveNextTo: true }); - toast.dismiss(toastId); - refresh(); - setSearchParams({ view: filePath, ephemeral: ocrPath }); - } catch { - toast.error('Failed to extract text from image', { id: toastId }); - } - }; - const handlePlay = (entry: DirEntry) => { const filePath = entryPath(entry.name); setSearchParams({ play: filePath }); @@ -752,7 +739,6 @@ export const useFileBrowserApp = ( handleCreateDashboard, handleCreateDashboardHere, handleReadAloud, - handleOcr, handleExtract, handlePlay, handleGitClone,