-
Notifications
You must be signed in to change notification settings - Fork 2.6k
feat: Replace image-only attachment with general file attachment support (#5532) #5533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Replace image-only attachment with general file attachment support (#5532) #5533
Conversation
…ort (RooCodeInc#5532) - Replace camera icon with paperclip icon in ChatTextArea component - Add comprehensive file attachment support via new process-files.ts - Support all file types with intelligent MIME type detection - Maintain backward compatibility with existing image functionality - Add translations for 'attachFiles' in all supported languages (en, fr, ko, tr, ru) - Update message types to support both selectImages and selectFiles workflows - Add file size validation (10MB limit) and proper error handling - Support text files (displayed as content) and binary files (base64 encoded) This enhancement expands the current image-only attachment system to support all file types while preserving existing functionality and user workflows.
| fileUris.map(async (uri) => { | ||
| const filePath = uri.fsPath | ||
| const fileName = path.basename(filePath) | ||
| const stats = await fs.stat(filePath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider wrapping file operations (fs.stat and fs.readFile) in try/catch blocks to handle potential errors (e.g. permission issues or file removal) gracefully.
|
Automatically closed: PR created by @roomote-agent before 2025-07-16 |
|
I see this PR was automatically closed. I'm reviewing the file attachment feature implementation and will assess what needs to be completed. Let me check the current state of the code and provide an update. |
✅ Implementation CompleteI have successfully implemented the general file attachment feature to replace the image-only attachment system. Here is a comprehensive summary of what was accomplished: 🚀 New Pull Request Created🎯 Key Features Implemented📎 UI Changes
🔧 Comprehensive File Processing System
🛡️ Smart Content Handling
🌐 Internationalization
🔄 Backward Compatibility
🏗️ Technical ImplementationMessage System Updates
Frontend Components
File Processing Architecture
🧪 Quality Assurance
📋 Files Modified
🔍 Current Status
The implementation successfully addresses all requirements from issue #5532 while maintaining full backward compatibility and providing a robust foundation for future file handling enhancements. |
Description
Fixes #5532
This PR expands the current image-only attachment system to support all file types while maintaining full backward compatibility. The enhancement replaces the camera icon with a paperclip icon to better reflect the general file attachment functionality.
Changes Made
UI Updates
Backend Enhancements
Message System Updates
Internationalization
Backward Compatibility
Technical Implementation
File Type Support
The new system supports comprehensive file categories:
Testing Performed
Verification of Acceptance Criteria
Files Changed
Potential Impacts
The implementation maintains the existing codebase patterns while providing a robust, extensible file attachment system.
Important
Expands attachment system to support all file types with UI, backend, and internationalization updates, maintaining backward compatibility with image-only attachments.
ChatTextArea.tsxandChatView.tsx.ChatTextArea.tsx.process-files.tsfor handling all file types with MIME type detection and size validation.WebviewMessageand "selectedFiles" toExtensionMessage.webviewMessageHandler.tsto handle new message types.ChatTextArea.spec.tsxto cover new file attachment functionality.This description was created by
for a0633ad. You can customize this summary. It will automatically update as commits are pushed.