Skip to content

Conversation

@simondmorias
Copy link

@simondmorias simondmorias commented Nov 27, 2025

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 attached flag to distinguish attach mode from normal mode
  • Parse and expose remoteHost from connection URL in SDK context
  • Fetch remote directory via /path endpoint 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
image image

When connecting to a remote opencode instance via 'attach', the taskbar
now displays the remote host:port and the server's working directory
instead of the local machine's cwd.

- Add 'attached' flag to tui() to distinguish attach mode from normal mode
- Parse and expose remoteHost from connection URL in SDK context
- Fetch remote directory via /path endpoint during bootstrap
- Update useDirectory() hook to show 'host:port /remote/path:branch'
@simondmorias simondmorias marked this pull request as ready for review November 27, 2025 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant