Add upload command for sending images/files to Devin sessions#5
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Open
Add upload command for sending images/files to Devin sessions#5devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
- Add upload_file_to_attachments() API function that uploads files to /v1/attachments endpoint - Add upload CLI command that takes session_id and --image/-i option - Command uploads file and sends message to session with attachment URL - Follows existing patterns from message command and send_message_to_session() - Supports both json and table output formats - Uses multipart/form-data encoding via requests files parameter Co-Authored-By: parker.duff@codeium.com <pwjduff@gmail.com>
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add upload command for sending images/files to Devin sessions
Summary
This PR adds a new
uploadCLI command that allows users to upload images and other files to existing Devin sessions. The implementation follows the existing code patterns and uses the Devin API's/v1/attachmentsendpoint.Key changes:
upload_file_to_attachments()function that uploads files to/v1/attachmentsendpoint using multipart/form-datauploadCLI command that takessession_idand--image/-ioptionATTACHMENT:"{url}"jsonandtableoutput formatsUsage:
Review & Testing Checklist for Human
devin-cli upload <session_id> --image <test_image>with a valid session ID and verify the attachment appears correctly in the Devin sessionATTACHMENT:"{url}"format is correctly recognized by Devin (based on API docs, but should be verified)Test Plan
devin-cli create --prompt "Test session"echo "test" > test.txt(or use any real image)devin-cli upload <session_id> --image test.txt--messageoption and--output jsonoptionNotes
--imageflag accepts any file type (not just images), following the API's support for all file typestest_auth_test_commandunrelated to these changes)