feat(gemini): add image-with-ref adapter for multi-image uploads#2020
Open
mr7thing wants to merge 1 commit into
Open
feat(gemini): add image-with-ref adapter for multi-image uploads#2020mr7thing wants to merge 1 commit into
mr7thing wants to merge 1 commit into
Conversation
Adds a Gemini adapter that supports N reference images via a comma-separated --ref string. Wraps the existing upload flow into a single command. Verified end-to-end on gemini.google.com/app (zh-CN): 3 reference images attach to the composer thumbnail row, ready for the prompt. Tests: 11 new vitest cases, 106/106 gemini suite green.
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
Adds
image-with-refadapter for Gemini — upload N reference images then generate in one command.Usage
How it works
DOM.setFileInputFilesTesting
Known Limitation
OS Picker popup: On some Gemini builds, clicking the "Upload file" menuitem triggers the native OS file picker dialog instead of inserting the hidden
<input type=file>. If the picker appears, the adapter falls back to pressingEscapeto close it, then retries the upload. In persistent cases, restarting Chrome and reusing the same chat ID recovers the session without losing conversation state. This is a Gemini frontend behavior — not something the adapter controls.Changes: 2 files, +266 lines