feat(compact): expose upload_file - #2678
Open
alectimison-maker wants to merge 1 commit into
Open
Conversation
|
@alectimison-maker is attempting to deploy a commit to the esokullu's projects Team on Vercel. A member of the Team first needs to authorize it. |
Contributor
There was a problem hiding this comment.
Pull request overview
Exposes a platform-specific upload_file workflow to Compact Act mode across Chrome and Firefox.
Changes:
- Adds narrow Compact upload schemas and prompt guidance.
- Preserves Ask mode and excludes download workflows.
- Adds cross-browser tool-boundary and guidance tests.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/chrome/src/agent/tools.js |
Adds Chrome Compact upload support. |
src/firefox/src/agent/tools.js |
Adds Firefox Compact upload and picker support. |
test/run.js |
Tests Compact upload schemas, prompts, and boundaries. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'click', 'type_text', 'press_keys', | ||
| 'navigate', 'new_tab', 'wait_for_element', | ||
| 'fetch_url', | ||
| 'upload_file', |
| 'click', 'type_text', 'press_keys', | ||
| 'navigate', 'new_tab', 'wait_for_element', | ||
| 'fetch_url', | ||
| 'upload_file', |
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.
Summary
upload_fileto Compact Act in both Chrome and FirefoxCloses #413.
Design notes
Compact gains only
upload_file; Ask and the rest of the Compact tool boundary stay unchanged. Chrome accepts a current userattachmentIdor an absolutefilePathexplicitly supplied by the user. Firefox accepts a currentattachmentIdor falls back to WebBrain's existing picker. Neither Compact schema exposesdownloadIdor points the model towarddownload_files/list_downloads.The Compact prompts direct the model to use an existing file input first, avoid generic selectors when multiple inputs exist, allow one guarded initializer click for a lazy widget, and verify the page attachment before submitting.
Testing
node --check src/chrome/src/agent/tools.jsnode --check src/firefox/src/agent/tools.jsnode --check test/run.jsnode test/run.js— 1450 passed; the sole unrelated failure is the existingpackage.json26.0.10 vs newest CHANGELOG 26.0.0 mismatchnpm run test:security— 60/60 checks passed