diff --git a/public/manifest.webmanifest b/public/manifest.webmanifest index 5a17280c..f30b2c96 100644 --- a/public/manifest.webmanifest +++ b/public/manifest.webmanifest @@ -8,12 +8,12 @@ "theme_color": "#000000", "icons": [ { - "src": "/icon-192.png", + "src": "/favicon.png", "sizes": "192x192", "type": "image/png" }, { - "src": "/icon-512.png", + "src": "/favicon.png", "sizes": "512x512", "type": "image/png" } diff --git a/src/components/Shakespeare/FileTree.tsx b/src/components/Shakespeare/FileTree.tsx index 5621c5e1..c88c949f 100644 --- a/src/components/Shakespeare/FileTree.tsx +++ b/src/components/Shakespeare/FileTree.tsx @@ -2,11 +2,10 @@ import { useState, useEffect, useCallback } from 'react'; import { useProjectsManager } from '@/hooks/useProjectsManager'; import { useFS } from '@/hooks/useFS'; import { useGitStatus } from '@/hooks/useGitStatus'; -import { ChevronRight, ChevronDown, File, Folder, Search, FileText } from 'lucide-react'; +import { ChevronRight, ChevronDown, File, Folder, Search } from 'lucide-react'; import { cn } from '@/lib/utils'; import { createGitignoreFilter, normalizePathForGitignore } from '@/lib/gitignore'; import { Input } from '@/components/ui/input'; -import { Button } from '@/components/ui/button'; interface FileTreeProps { projectId: string; @@ -31,7 +30,6 @@ export function FileTree({ projectId, onFileSelect, selectedFile }: FileTreeProp shouldShow: (path: string) => boolean; } | null>(null); const [searchTerm, setSearchTerm] = useState(''); - const [searchInContent, setSearchInContent] = useState(false); const [isSearching, setIsSearching] = useState(false); const { fs } = useFS(); const projectsManager = useProjectsManager(); @@ -184,18 +182,6 @@ export function FileTree({ projectId, onFileSelect, selectedFile }: FileTreeProp if (fileNameMatch) { results.push(node); - } else if (searchInContent) { - try { - const content = await projectsManager.readFile(projectId, node.path); - const contentMatch = content.toLowerCase().includes(searchTermLower); - - if (contentMatch) { - results.push(node); - } - } catch (error) { - // Skip files that can't be read - console.warn(`Could not read file ${node.path}:`, error); - } } } else if (node.type === 'directory' && node.children) { const childResults = await searchInFiles(node.children, term); @@ -210,10 +196,9 @@ export function FileTree({ projectId, onFileSelect, selectedFile }: FileTreeProp } } - return results; - }, [projectsManager, projectId, searchInContent]); + return results }, []); - // Perform search when search term or searchInContent changes + // Perform search when search term changes useEffect(() => { const performSearch = async () => { if (!searchTerm.trim()) { @@ -234,7 +219,7 @@ export function FileTree({ projectId, onFileSelect, selectedFile }: FileTreeProp }; performSearch(); - }, [searchTerm, searchInContent, tree, searchInFiles]); + }, [searchTerm, tree, searchInFiles]); const renderNode = (node: FileNode, depth: number = 0) => { const isSelected = selectedFile === node.path; @@ -307,7 +292,7 @@ export function FileTree({ projectId, onFileSelect, selectedFile }: FileTreeProp return (
{/* Search Section */} -
+
-
- - {isSearching && ( -
Searching...
- )} -
{/* File Tree */}