[PR #809] [MERGED] feat(tui): treat pasted text file paths as file references #9714

Closed
opened 2026-02-16 18:14:02 -05:00 by yindo · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/anomalyco/opencode/pull/809
Author: @timoclsn
Created: 7/9/2025
Status: Merged
Merged: 7/9/2025
Merged by: @adamdotdevin

Base: devHead: improve-pasting-text-file-paths


📝 Commits (1)

  • 714d677 feat(tui): treat pasted text file paths as file reference

📊 Changes

1 file changed (+10 additions, -1 deletions)

View changed files

📝 packages/tui/internal/components/chat/editor.go (+10 -1)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/anomalyco/opencode/pull/809 **Author:** [@timoclsn](https://github.com/timoclsn) **Created:** 7/9/2025 **Status:** ✅ Merged **Merged:** 7/9/2025 **Merged by:** [@adamdotdevin](https://github.com/adamdotdevin) **Base:** `dev` ← **Head:** `improve-pasting-text-file-paths` --- ### 📝 Commits (1) - [`714d677`](https://github.com/anomalyco/opencode/commit/714d677d0b150122b8ca6fff764bf03b93ffd034) feat(tui): treat pasted text file paths as file reference ### 📊 Changes **1 file changed** (+10 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `packages/tui/internal/components/chat/editor.go` (+10 -1) </details> ### 📄 Description 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." --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
yindo added the pull-request label 2026-02-16 18:14:02 -05:00
yindo closed this issue 2026-02-16 18:14:02 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9714