Skip to content

Bug: Unable to Revert Code Outside Workspace in OpenCode #13425

@satyamkumar420

Description

@satyamkumar420

Description

When working with OpenCode, I noticed that the revert functionality does not work for files located outside the current workspace directory.
If I make changes to a file outside the workspace and attempt to revert those changes, nothing happens. The revert action either fails silently or does not trigger at all.

Expected Behavior
The revert feature should:
Either allow reverting changes for files outside the workspace
Or clearly show an error/notification explaining that reverting is restricted to workspace files only

Actual Behavior
Revert does not work for files outside the workspace
No clear error message or feedback is shown

Steps to Reproduce

  1. Open a workspace in OpenCode
  2. Modify a file that is located outside the workspace directory
  3. Try to revert the changes
  4. Observe that revert does not work

Environment
OS: Windows 10
OpenCode Version: and 1.60

Plugins

No response

OpenCode version

No response

Steps to reproduce

No response

Screenshot and/or share link

No response

Operating System

No response

Terminal

No response

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingwindows

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