fix(TUI): make tui work when OPENCODE_SERVER_PASSWORD is set
What does this PR do?
When setting the OPENCODE_SERVER_PASSWORD env varaiable the regular tui app would no longer work. See the issue this PR fixes for details please.
How did you verify your code works?
Run OPENCODE_SERVER_PASSWORD='secure-password' bun dev . after applying fix and sending a test-prompt.
Furthermore checked that when I return undefined for my new "getAuthorizationHeader" helper and run the same comment the previous issue persists, so this isn't due to the bundles CLI tool behaving different from bun dev .in this regard.
Fixes #8173
Thanks for your contribution!
This PR doesn't have a linked issue. All PRs must reference an existing issue.
Please:
- Open an issue describing the bug/feature (if one doesn't exist)
- Add
Fixes #<number>orCloses #<number>to this PR description
See CONTRIBUTING.md for details.
The following comment was made by an LLM, it may be inaccurate:
No duplicate PRs found
/review
lgtm
This PR fixed the TUI authentication for the RPC communication path, but there was still an issue when TUI starts an HTTP server (due to --port flag being set). The complete fix is now available in PR #9095, which addresses the HTTP server authentication path.