[PR #9796] fix(web): support absolute paths in Open Project dialog #13224

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

Original Pull Request: https://github.com/anomalyco/opencode/pull/9796

State: closed
Merged: No


Summary

Fixes #9795

Allows the "Open project" dialog to browse and search directories
outside the user's home folder.

Changes

Server endpoint (file.ts)

  • Added directory parameter to /find/file endpoint

File search (index.ts)

  • File.search() now accepts an optional directory parameter
  • Scans the specified directory directly when provided

Dialog component (dialog-select-directory.tsx)

  • Parses absolute paths from user input
  • Trailing slash (/develop/) shows directory contents
  • Without trailing slash (/develop) searches parent for match
  • Shows full path for directories outside home, ~ prefix for home paths

Testing

  • /develop/ → lists folders in /develop/
  • /develop/s → filters to folders starting with "s"
  • d → searches home directory as before
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/9796 **State:** closed **Merged:** No --- ## Summary Fixes #9795 Allows the "Open project" dialog to browse and search directories outside the user's home folder. ## Changes ### Server endpoint (`file.ts`) - Added `directory` parameter to `/find/file` endpoint ### File search (`index.ts`) - `File.search()` now accepts an optional `directory` parameter - Scans the specified directory directly when provided ### Dialog component (`dialog-select-directory.tsx`) - Parses absolute paths from user input - Trailing slash (`/develop/`) shows directory contents - Without trailing slash (`/develop`) searches parent for match - Shows full path for directories outside home, `~` prefix for home paths ## Testing - `/develop/` → lists folders in `/develop/` - `/develop/s` → filters to folders starting with "s" - `d` → searches home directory as before
yindo added the pull-request label 2026-02-16 18:18:05 -05:00
yindo closed this issue 2026-02-16 18:18:05 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#13224