fix: resolve TypeScript and Rust build errors and warnings
- Fixed TypeScript errors in ClaudeCodeSession.tsx: - Removed unused imports (Square, PreviewPromptDialog, etc.) - Removed unused handleOpenPreview function - Fixed unused detectedUrl state variable - Fixed TypeScript error in StreamMessage.tsx: - Removed unused useMemo import - Fixed TypeScript errors in ToolWidgets.tsx: - Prefixed unused result props with underscore in multiple widgets - Fixed Rust warnings: - Removed unused imports in commands modules - Prefixed unused variables with underscore - Added #[allow(dead_code)] for API methods intended for future use Closes #31 Closes #23 Closes #21 Closes #22
This commit is contained in:
@@ -9,8 +9,7 @@ import {
|
||||
ChevronDown,
|
||||
GitBranch,
|
||||
Settings,
|
||||
Globe,
|
||||
Square
|
||||
Globe
|
||||
} from "lucide-react";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import { Input } from "@/components/ui/input";
|
||||
@@ -30,7 +29,6 @@ import { Dialog, DialogContent, DialogHeader, DialogTitle, DialogDescription, Di
|
||||
import { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger } from "@/components/ui/tooltip";
|
||||
import { SplitPane } from "@/components/ui/split-pane";
|
||||
import { WebviewPreview } from "./WebviewPreview";
|
||||
import { PreviewPromptDialog } from "./PreviewPromptDialog";
|
||||
import type { ClaudeStreamMessage } from "./AgentExecution";
|
||||
import { useVirtualizer } from "@tanstack/react-virtual";
|
||||
|
||||
@@ -88,7 +86,6 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({
|
||||
// New state for preview feature
|
||||
const [showPreview, setShowPreview] = useState(false);
|
||||
const [previewUrl, setPreviewUrl] = useState("");
|
||||
const [detectedUrl, setDetectedUrl] = useState("");
|
||||
const [showPreviewPrompt, setShowPreviewPrompt] = useState(false);
|
||||
const [splitPosition, setSplitPosition] = useState(50);
|
||||
const [isPreviewMaximized, setIsPreviewMaximized] = useState(false);
|
||||
@@ -566,17 +563,11 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({
|
||||
// Handle URL detection from terminal output
|
||||
const handleLinkDetected = (url: string) => {
|
||||
if (!showPreview && !showPreviewPrompt) {
|
||||
setDetectedUrl(url);
|
||||
setPreviewUrl(url);
|
||||
setShowPreviewPrompt(true);
|
||||
}
|
||||
};
|
||||
|
||||
const handleOpenPreview = () => {
|
||||
setPreviewUrl(detectedUrl);
|
||||
setShowPreview(true);
|
||||
setShowPreviewPrompt(false);
|
||||
};
|
||||
|
||||
const handleClosePreview = () => {
|
||||
setShowPreview(false);
|
||||
setIsPreviewMaximized(false);
|
||||
|
Reference in New Issue
Block a user