opencode
opencode copied to clipboard
fix(tui): defer prompt.set() to prevent crash when using --prompt flag
What does this PR do?
Fixes a regression caused by #7702 that causes a crash when using the --prompt flag.
Fixes #7818 Fixes #7850
How did you verify your code works?
I ran tests with --prompt populated and without, as well as tested that you can still successfully fork from the first message so as to not cause any regression from the original PR.
The following comment was made by an LLM, it may be inaccurate:
No duplicate PRs found
Regression was fixed in 3a30773874ccb92d085eddbab66d053c5d4e6326