[PR #6711] Fix/directory handling combined #12054

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

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

State: closed
Merged: No


Fixes TUI attach command not properly passing the working directory context to the SDK client.

Changes:

  • Pass --dir argument from attach command through TUI to SDK via x-opencode-directory header
  • Use sync.data.path.directory for file autocomplete, theme discovery, exports, and path normalization
  • Add normalizePathFromDirectory utility function with tests

before:

https://github.com/user-attachments/assets/1bfe033b-0301-4578-aef2-14ac062b19c3

after:

https://github.com/user-attachments/assets/bcbde0fb-fc0c-4db2-8e5a-c21a23e7ccc3

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/6711 **State:** closed **Merged:** No --- Fixes TUI attach command not properly passing the working directory context to the SDK client. **Changes:** - Pass `--dir` argument from attach command through TUI to SDK via `x-opencode-directory` header - Use `sync.data.path.directory` for file autocomplete, theme discovery, exports, and path normalization - Add `normalizePathFromDirectory` utility function with tests before: https://github.com/user-attachments/assets/1bfe033b-0301-4578-aef2-14ac062b19c3 after: https://github.com/user-attachments/assets/bcbde0fb-fc0c-4db2-8e5a-c21a23e7ccc3
yindo added the pull-request label 2026-02-16 18:16:59 -05:00
yindo closed this issue 2026-02-16 18:16:59 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12054