opencode icon indicating copy to clipboard operation
opencode copied to clipboard

Fix/web file viewer project root

Open shuv1337 opened this issue 2 weeks ago • 0 comments

Fixed file viewer issues for project root and nested directories by adding request deduplication and improving path handling.

Added loading Map to deduplicate concurrent file read requests, preventing duplicate SDK calls for the same file Added listing Map to deduplicate concurrent directory list requests Fixed empty path handling in list() function to properly handle project root (changed path + "/" to path ? path + "/" : "") Simplified fetch() to always call list(parent) regardless of whether parent is empty, ensuring proper directory listing for root-level files

Before:

https://github.com/user-attachments/assets/6b597f4f-d730-4693-8586-e662db4958e5

After:

https://github.com/user-attachments/assets/529c9252-2d10-4a4c-9f69-de6c59783782

shuv1337 avatar Jan 01 '26 09:01 shuv1337