Skip to content

Commit 2d73a38

Browse files
committed
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.
1 parent c3f39b9 commit 2d73a38

9 files changed

Lines changed: 6 additions & 779 deletions

File tree

src-tauri/Cargo.lock

Lines changed: 3 additions & 378 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ futures = "0.3"
4343
async-trait = "0.1"
4444
tempfile = "3"
4545
which = "7"
46-
headless_chrome = { version = "1.0", features = ["fetch"] }
4746
sha2 = "0.10"
4847
zstd = "0.13"
4948
uuid = { version = "1.6", features = ["v4", "serde"] }

src-tauri/src/commands/agents.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ use reqwest;
55
use rusqlite::{params, Connection, Result as SqliteResult};
66
use serde::{Deserialize, Serialize};
77
use serde_json::Value as JsonValue;
8-
use std::path::PathBuf;
98
use std::process::Stdio;
109
use std::sync::Mutex;
1110
use tauri::{AppHandle, Emitter, Manager, State};

src-tauri/src/commands/mod.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
pub mod agents;
22
pub mod claude;
33
pub mod mcp;
4-
pub mod screenshot;
54
pub mod usage;

src-tauri/src/commands/screenshot.rs

Lines changed: 0 additions & 269 deletions
This file was deleted.

src-tauri/src/main.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ use commands::mcp::{
3333
mcp_read_project_config, mcp_remove, mcp_reset_project_choices, mcp_save_project_config,
3434
mcp_serve, mcp_test_connection,
3535
};
36-
use commands::screenshot::{capture_url_screenshot, cleanup_screenshot_temp_files};
36+
3737
use commands::usage::{
3838
get_session_stats, get_usage_by_date_range, get_usage_details, get_usage_stats,
3939
};
@@ -160,9 +160,7 @@ fn main() {
160160
mcp_reset_project_choices,
161161
mcp_get_server_status,
162162
mcp_read_project_config,
163-
mcp_save_project_config,
164-
capture_url_screenshot,
165-
cleanup_screenshot_temp_files
163+
mcp_save_project_config
166164
])
167165
.run(tauri::generate_context!())
168166
.expect("error while running tauri application");

src/components/ClaudeCodeSession.tsx

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -792,17 +792,7 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({
792792
// Keep the previewUrl so it can be restored when reopening
793793
};
794794

795-
const handlePreviewScreenshot = async (imagePath: string) => {
796-
console.log("Screenshot captured:", imagePath);
797-
798-
// Add the screenshot to the floating prompt input
799-
if (floatingPromptRef.current) {
800-
floatingPromptRef.current.addImage(imagePath);
801-
802-
// Show a subtle animation/feedback that the image was added
803-
// You could add a toast notification here if desired
804-
}
805-
};
795+
806796

807797
const handlePreviewUrlChange = (url: string) => {
808798
console.log('[ClaudeCodeSession] Preview URL changed to:', url);
@@ -951,7 +941,6 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({
951941
<WebviewPreview
952942
initialUrl={previewUrl}
953943
onClose={handleClosePreview}
954-
onScreenshot={handlePreviewScreenshot}
955944
isMaximized={isPreviewMaximized}
956945
onToggleMaximize={handleTogglePreviewMaximize}
957946
onUrlChange={handlePreviewUrlChange}
@@ -1101,7 +1090,6 @@ export const ClaudeCodeSession: React.FC<ClaudeCodeSessionProps> = ({
11011090
<WebviewPreview
11021091
initialUrl={previewUrl}
11031092
onClose={handleClosePreview}
1104-
onScreenshot={handlePreviewScreenshot}
11051093
isMaximized={isPreviewMaximized}
11061094
onToggleMaximize={handleTogglePreviewMaximize}
11071095
onUrlChange={handlePreviewUrlChange}

0 commit comments

Comments
 (0)