opencode icon indicating copy to clipboard operation
opencode copied to clipboard

feat: show remote host and cwd in taskbar when using attach

Open simondmorias opened this issue 2 months ago • 0 comments

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

simondmorias avatar Nov 27 '25 13:11 simondmorias