[PR #4827] feat: show remote host and cwd in taskbar when using attach #11134

Open
opened 2026-02-16 18:15:55 -05:00 by yindo · 0 comments
Owner

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

State: open
Merged: No


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
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/4827 **State:** open **Merged:** No --- ## 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` <img width="784" height="590" alt="image" src="https://github.com/user-attachments/assets/1777e7fe-5003-4aad-a76a-8aef3d06f6ec" /> <img width="1414" height="730" alt="image" src="https://github.com/user-attachments/assets/86fec094-1aa1-4db1-89ce-1be2cb9b1bcc" />
yindo added the pull-request label 2026-02-16 18:15:55 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#11134