refactor: Store pasted images in memory as base64 data URLs
- Remove save_clipboard_image and cleanup_temp_images backend commands - Update FloatingPromptInput to store pasted images as data URLs in the prompt - Update ImagePreview component to handle both file paths and data URLs - Update extractImagePaths to properly handle quoted data URLs - Update handleRemoveImage to handle data URL removal This eliminates file system operations for pasted images and stores them directly in the prompt as base64 data URLs (e.g., @"data:image/png;base64,..."). Images are now fully self-contained within the session without creating temp files.
This commit is contained in:
@@ -18,13 +18,13 @@ use commands::agents::{
|
||||
};
|
||||
use commands::claude::{
|
||||
cancel_claude_execution, check_auto_checkpoint, check_claude_version, cleanup_old_checkpoints,
|
||||
cleanup_temp_images, clear_checkpoint_manager, continue_claude_code, create_checkpoint, execute_claude_code,
|
||||
clear_checkpoint_manager, continue_claude_code, create_checkpoint, execute_claude_code,
|
||||
find_claude_md_files, fork_from_checkpoint, get_checkpoint_diff, get_checkpoint_settings,
|
||||
get_checkpoint_state_stats, get_claude_session_output, get_claude_settings, get_project_sessions,
|
||||
get_recently_modified_files, get_session_timeline, get_system_prompt, list_checkpoints,
|
||||
list_directory_contents, list_projects, list_running_claude_sessions, load_session_history,
|
||||
open_new_session, read_claude_md_file, restore_checkpoint, resume_claude_code,
|
||||
save_claude_md_file, save_claude_settings, save_clipboard_image, save_system_prompt, search_files,
|
||||
save_claude_md_file, save_claude_settings, save_system_prompt, search_files,
|
||||
track_checkpoint_message, track_session_messages, update_checkpoint_settings,
|
||||
get_hooks_config, update_hooks_config, validate_hook_command,
|
||||
ClaudeProcessState,
|
||||
@@ -101,8 +101,6 @@ fn main() {
|
||||
find_claude_md_files,
|
||||
read_claude_md_file,
|
||||
save_claude_md_file,
|
||||
save_clipboard_image,
|
||||
cleanup_temp_images,
|
||||
load_session_history,
|
||||
execute_claude_code,
|
||||
continue_claude_code,
|
||||
|
Reference in New Issue
Block a user