Skip to content

feat(tui): treat pasted text file paths as file references#809

Merged
adamdotdevin merged 1 commit into
anomalyco:devfrom
timoclsn:improve-pasting-text-file-paths
Jul 9, 2025
Merged

feat(tui): treat pasted text file paths as file references#809
adamdotdevin merged 1 commit into
anomalyco:devfrom
timoclsn:improve-pasting-text-file-paths

Conversation

@timoclsn

@timoclsn timoclsn commented Jul 9, 2025

Copy link
Copy Markdown
Contributor

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."

@adamdotdevin
adamdotdevin merged commit f220211 into anomalyco:dev Jul 9, 2025
@timoclsn
timoclsn deleted the improve-pasting-text-file-paths branch July 10, 2025 04:33
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants