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

@@ -1481,38 +1481,7 @@ export const api = {
}
},
/**
* Captures a screenshot of a specific region in the window
* @param url - The URL to capture
* @param selector - Optional selector to capture
* @param fullPage - Whether to capture the full page
* @returns Promise resolving to the path of the saved screenshot
*/
async captureUrlScreenshot(
url: string,
selector?: string | null,
fullPage: boolean = false
): Promise<string> {
return await invoke<string>("capture_url_screenshot", {
url,
selector,
fullPage,
});
},
/**
* Cleans up old screenshot files from the temporary directory
* @param olderThanMinutes - Remove files older than this many minutes (default: 60)
* @returns Promise resolving to the number of files deleted
*/
async cleanupScreenshotTempFiles(olderThanMinutes?: number): Promise<number> {
try {
return await invoke<number>("cleanup_screenshot_temp_files", { olderThanMinutes });
} catch (error) {
console.error("Failed to cleanup screenshot files:", error);
throw error;
}
},
/**
* List all available Claude installations on the system