Add upload command for file attachments#6
Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Open
Add upload command for file attachments#6devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
Conversation
- Add upload_file() helper function for POST to /v1/attachments - Add upload CLI command with --output and --format-prompt flags - Support json and table output formats - Display ATTACHMENT: format instructions for users - Add comprehensive tests for upload functionality - Update README with upload command documentation and examples - Handle file not found, network errors, and API failures - Tested with multiple file types (text, JSON, Python, CSV) - All 41 tests pass including 5 new upload tests 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 file attachments
Summary
Implements a new
uploadCLI command that allows users to upload files to Devin sessions via the attachments API endpoint (POST https://api.devin.ai/v1/attachments). The command uploads a file and returns the attachment URL that can be used in session prompts with theATTACHMENT:"<url>"format.Changes:
upload_file()helper function for API interaction (60s timeout for uploads)uploadCLI command with--output(json/table) and--format-promptflagsVerification:
Review & Testing Checklist for Human
This is a low-risk change that follows existing CLI patterns, but requires end-to-end verification:
devin-cli upload <file>, then create a Devin session using the returned URL withATTACHMENT:"<url>"format to verify Devin can actually access and use the uploaded fileNotes
create,get,message)clickandrequests)"https://..."), which is automatically strippedDevin Session: https://app.devin.ai/sessions/91d7514b99244be9a28804450a01cf51
Requested by: @parkerduff (parker.duff@codeium.com)