Repository navigation
feat(app): attach any file and deliver unsupported ones by path - #49467
Merged
Merged
Conversation
Hona
added this pull request to stack #49468
September 17, 2026 03:48
Hona
marked this pull request as ready for review
September 17, 2026 03:49
Hona
force-pushed
the
attachment-fallback
branch
from
September 17, 2026 04:26
7b382f2 to
d5cad78
Compare
Hona
force-pushed
the
attachment-fallback
branch
from
September 17, 2026 04:48
d5cad78 to
4f474c9
Compare
Hona
force-pushed
the
attachment-fallback
branch
3 times, most recently
from
September 17, 2026 10:13
73a7aba to
5acf084
Compare
Drag, paste, and pick no longer reject files the model cannot read. On submit each attachment is delivered inline when the selected model reads it natively; otherwise the prompt references it by path: the source path on a local server, or a copy staged under the server tmp directory (from /api/info) via fs.write on a remote one. Removes the accepted-type filters and the unsupported-attachment toast.
Hona
force-pushed
the
attachment-fallback
branch
from
September 17, 2026 10:17
5acf084 to
721033b
Compare
jinhuang712
pushed a commit
to jinhuang712/opencode
that referenced
this pull request
Sep 26, 2026
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.
Stacked on #49466.
Drop, paste, or pick any file into the composer. If the selected model reads it natively, nothing changes. Otherwise, instead of the "Unsupported attachment" toast, the model gets a path it can open with its tools.
.pptxattachedunzip -lflowchart TD A[Attachment on submit] --> B{Model reads<br/>this MIME natively?} B -- "text/plain · png/jpeg/gif/webp (image input) · pdf (pdf input)" --> C["inline: data: URI in files (unchanged)"] B -- no --> D{Server local and<br/>source path known?} D -- yes --> E["path = source path"] D -- no --> F["fs.write → <info.paths.tmp>/uploads/<uuid>/<name>"] --> G["path = resolved server path"] E & G --> H["text += Attached file: `<path>`<br/>metadata.attachments += { name, mime, path }"]packages/app/src/composer/attachments/deliver.ts, so it uses the model selected at send time and covers prompts, custom commands, and queued-prompt edits.AttachmentCardeverywhere: in the composer before sending, and on the sent message. The sent message renders it frommetadata.attachments(same mechanism as review comments), so it survives reloads and other clients;displayTextstays the typed text while the model sees:sha256matched on the server, model listed the archive and reported the VPS hostname.<input accept>, desktop picker filter,file-picker.ts) andprompt.toast.pasteUnsupported.*in all locales.