[FEATURE]: Endpoint for file submission #6959

Open
opened 2026-02-16 18:05:43 -05:00 by yindo · 2 comments
Owner

Originally created by @xeon826 on GitHub (Jan 20, 2026).

Originally assigned to: @thdxr on GitHub.

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

I've created a fork/branch though I've not tested it yet which is why I haven't created a PR, if anyone can test it, I'd appreciate that, I just haven't gotten around to it. It's simply to convey the purpose of this feature at this point.

I created an additional feature for this plugin which is a Neovim wrapper for opencode. My feature is a file picker for this plugin but the issue I'm having is that opencode doesn't have an endpoint for submitting file paths. I can send the file path and the LLM will deduce that it should read that file but with the @path/to/file functionality innate to opencode, it seems the file is included in the prompt which is why this would be useful.

To summarize: an endpoint for file submission in the prompt.

Originally created by @xeon826 on GitHub (Jan 20, 2026). Originally assigned to: @thdxr on GitHub. ### Feature hasn't been suggested before. - [x] I have verified this feature I'm about to request hasn't been suggested before. ### Describe the enhancement you want to request I've created a [fork/branch](https://github.com/xeon826/opencode/tree/file-part-submission) though I've not tested it yet which is why I haven't created a PR, if anyone can test it, I'd appreciate that, I just haven't gotten around to it. It's simply to convey the purpose of this feature at this point. I created an additional feature for [this plugin](https://github.com/NickvanDyke/opencode.nvim) which is a Neovim wrapper for opencode. My feature is a file picker for this plugin but the issue I'm having is that opencode doesn't have an endpoint for submitting file paths. I can send the file path and the LLM will deduce that it should read that file but with the `@path/to/file` functionality innate to opencode, it seems the file is included in the prompt which is why this would be useful. To summarize: an endpoint for file submission in the prompt.
yindo added the discussion label 2026-02-16 18:05:43 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 20, 2026):

This issue is related to some existing feature requests. While not exact duplicates, you may want to check:

  • #9614: Proposes a 'readall' built-in tool for handling multiple file confirmations
  • #9548: Discusses @mention syntax for one-time tool/MCP server activation
  • #9386: Discusses command-line tool specification

These could provide context on how file handling and tool invocation is being approached in the platform. Your endpoint proposal could integrate well with these discussions around tool submission and file handling workflows.

@github-actions[bot] commented on GitHub (Jan 20, 2026): This issue is related to some existing feature requests. While not exact duplicates, you may want to check: - #9614: Proposes a 'readall' built-in tool for handling multiple file confirmations - #9548: Discusses @mention syntax for one-time tool/MCP server activation - #9386: Discusses command-line tool specification These could provide context on how file handling and tool invocation is being approached in the platform. Your endpoint proposal could integrate well with these discussions around tool submission and file handling workflows.
Author
Owner

@nickjvandyke commented on GitHub (Jan 20, 2026):

The TUI used to interpret filepaths appended to the TUI input via API the same way as filepaths selected from opencode's completion menu. i.e. auto-include the file content in the prompt. But I think that was lost with the opentui migration.

If possible, re-adding that would be preferable to an endpoint and cover this use-case too. It makes opencode respond much faster to API-entered prompts because it doesn't have to READ the file first.

@nickjvandyke commented on GitHub (Jan 20, 2026): The TUI used to interpret filepaths appended to the TUI input via API the same way as filepaths selected from `opencode`'s completion menu. i.e. auto-include the file content in the prompt. But I think that was lost with the opentui migration. If possible, re-adding that would be preferable to an endpoint and cover this use-case too. It makes `opencode` respond much faster to API-entered prompts because it doesn't have to READ the file first.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6959