refactor: remove screenshot functionality and headless_chrome dependency

Remove the screenshot capture system and associated UI components to simplify the codebase.

- Remove screenshot.rs command module and related functionality
- Remove headless_chrome dependency from Cargo.toml
- Update Cargo.lock to reflect dependency changes
- Remove screenshot handlers and UI from WebviewPreview component
- Clean up screenshot-related API calls and imports
- Remove camera icon and capture controls from preview interface

This reduces bundle size and eliminates an underutilized feature.
This commit is contained in:
Mufeed VH
2025-07-02 20:29:38 +05:30
parent c3f39b966f
commit 2d73a38222
9 changed files with 6 additions and 779 deletions

View File

@@ -792,17 +792,7 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({
// Keep the previewUrl so it can be restored when reopening
};
const handlePreviewScreenshot = async (imagePath: string) => {
console.log("Screenshot captured:", imagePath);
// Add the screenshot to the floating prompt input
if (floatingPromptRef.current) {
floatingPromptRef.current.addImage(imagePath);
// Show a subtle animation/feedback that the image was added
// You could add a toast notification here if desired
}
};
const handlePreviewUrlChange = (url: string) => {
console.log('[ClaudeCodeSession] Preview URL changed to:', url);
@@ -951,7 +941,6 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({
<WebviewPreview
initialUrl={previewUrl}
onClose={handleClosePreview}
onScreenshot={handlePreviewScreenshot}
isMaximized={isPreviewMaximized}
onToggleMaximize={handleTogglePreviewMaximize}
onUrlChange={handlePreviewUrlChange}
@@ -1101,7 +1090,6 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({
<WebviewPreview
initialUrl={previewUrl}
onClose={handleClosePreview}
onScreenshot={handlePreviewScreenshot}
isMaximized={isPreviewMaximized}
onToggleMaximize={handleTogglePreviewMaximize}
onUrlChange={handlePreviewUrlChange}