mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-06 00:27:24 +00:00
Fix linter errors
This commit is contained in:
15 files changed
+93
-70
No files matched your search
@@ -7,7 +7,7 @@ import { ScrollArea } from '@/components/ui/scroll-area';
|
||||
import { Card } from '@/components/ui/card';
|
||||
import { Send, Bot, User, Settings, Play } from 'lucide-react';
|
||||
import { cn } from '@/lib/utils';
|
||||
import { useAISettings } from '@/contexts/AISettingsContext';
|
||||
import { useAISettings } from '@/hooks/useAISettings';
|
||||
import { FsToolSet } from '@/lib/FsToolSet';
|
||||
import { useFS } from '@/hooks/useFS';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useState, useEffect, useCallback } from 'react';
|
||||
import { useState, useEffect, useCallback, useMemo } from 'react';
|
||||
import { ProjectsManager } from '@/lib/fs';
|
||||
import { useFS } from '@/hooks/useFS';
|
||||
import { ChevronRight, ChevronDown, File, Folder } from 'lucide-react';
|
||||
@@ -22,7 +22,7 @@ export function FileTree({ projectId, onFileSelect, selectedFile }: FileTreeProp
|
||||
const [tree, setTree] = useState<FileNode[]>([]);
|
||||
const [isLoading, setIsLoading] = useState(true);
|
||||
const { fs } = useFS();
|
||||
const projectsManager = new ProjectsManager(fs);
|
||||
const projectsManager = useMemo(() => new ProjectsManager(fs), [fs]);
|
||||
|
||||
const buildFileTree = useCallback(async (projectId: string, dirPath: string): Promise<FileNode[]> => {
|
||||
const items = await projectsManager.listFiles(projectId, dirPath);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useState, useEffect, useCallback, useRef } from 'react';
|
||||
import { useState, useEffect, useCallback, useRef, useMemo } from 'react';
|
||||
import { ProjectsManager } from '@/lib/fs';
|
||||
import { useFS } from '@/hooks/useFS';
|
||||
import { Tabs, TabsContent } from '@/components/ui/tabs';
|
||||
@@ -51,7 +51,7 @@ export function PreviewPane({ projectId, activeTab }: PreviewPaneProps) {
|
||||
const [hasBuiltProject, setHasBuiltProject] = useState(false);
|
||||
const iframeRef = useRef<HTMLIFrameElement>(null);
|
||||
const { fs } = useFS();
|
||||
const projectsManager = new ProjectsManager(fs);
|
||||
const projectsManager = useMemo(() => new ProjectsManager(fs), [fs]);
|
||||
|
||||
const loadFileContent = useCallback(async (filePath: string) => {
|
||||
setIsLoading(true);
|
||||
|
||||
Reference in new issue
Block a user