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:
@@ -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}
|
||||
|
Reference in New Issue
Block a user