opencode
opencode copied to clipboard
feat: show remote host and cwd in taskbar when using attach
Summary
- When using
opencode attach <url>, the taskbar previously showed the local directory which was confusing. - Now displays the remote host:port and the server's working directory
- Shows format:
host:port /remote/path:branch(e.g.,myserver.com:4096 /home/user/project:main)
Changes
- Add
attachedflag to distinguish attach mode from normal mode - Parse and expose
remoteHostfrom connection URL in SDK context - Fetch remote directory via
/pathendpoint during bootstrap - Update
useDirectory()hook to show remote info when attached
Testing
- Manual run:
bun run --cwd packages/opencode --conditions=browser src/index.ts attach http://localhost:4096