Skip to content

[FEATURE]:Copy File or Directory Path from File Tree - OpenCode desktop application #16019

@VM451

Description

@VM451

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

Location:
File Tree (Toggle with CMD + \) → All Files


Problem

Currently, there is no way to copy the path of a file or directory directly from the file tree in the OpenCode desktop application.

When working with AI agents, users often need to reference the exact path of a file in order to instruct the agent to perform a specific action (such as editing, updating, or analyzing that file). Describing the location of files using plain language is often unclear and inefficient.

Most modern IDEs provide this capability by allowing users to right-click a file or folder and copy its path. This is a basic but very useful workflow feature that appears to be missing in OpenCode.


Proposed Solution

Add the ability to right-click a file or directory in the file tree and copy its path.

The context menu could include options such as:

  • Copy Absolute Path
  • Copy Relative Path

When selected, the chosen path should be copied to the system clipboard, allowing the user to paste it directly (CMD + V) into the AI agent chat.


Why This Is Useful

This feature would:

  • Make it easier to reference specific files when interacting with AI agents
  • Reduce ambiguity when describing file locations
  • Improve overall workflow efficiency
  • Match functionality commonly found in standard IDEs

Metadata

Metadata

Assignees

Labels

discussionUsed for feature requests, proposals, ideas, etc. Open discussionwebRelates to opencode on web / desktop

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions