feat(tui): treat pasted text file paths as file references#809
Merged
adamdotdevin merged 1 commit intoJul 9, 2025
Merged
Conversation
achembarpu
pushed a commit
to achembarpu/opencode
that referenced
this pull request
Aug 4, 2025
andreipromarketing-dev
pushed a commit
to andreipromarketing-dev/opencode
that referenced
this pull request
Apr 7, 2026
Co-authored-by: Sungmin Hong <hsungmin@amazon.com>
xywsxp
pushed a commit
to xywsxp/opencode
that referenced
this pull request
Apr 24, 2026
AIALRA-0
pushed a commit
to AIALRA-0/opencode-turn-engine
that referenced
this pull request
Jun 10, 2026
avion23
pushed a commit
to avion23/opencode
that referenced
this pull request
Jun 10, 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.
This PR updates the new paste file handling in a way that for text files it doesn't try to add them as a base64 attachments but treats them as a file reference (like when you added the file via the @ fuzzy search).
This restores my workflow of copying file paths in Neovim (e.g. packages/tui/internal/components/chat/editor.go) and pasting them in my prompt. (Mostly, I don't use the @ file search as I have the relevant files already open for browsing in Neovim.) This workflow broke with the new paste handling.
This change shouldn't break anything, as the current handling for text files just produces an error: "AI_UnsupportedFunctionalityError: 'file part media type text/plain' functionality not supported."