[PR #7259] fix(tui): ensure forked message text is inserted in prompt (resolves #7257) #12320

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

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

State: closed
Merged: Yes


Fixes regression where forking a session via /fork command or message dialog would not insert the selected message text into the prompt input box.

The issue was a timing problem where the createEffect that handles route.initialPrompt ran before the prompt ref was assigned during component initialization.

Now applies the initial prompt directly in the Prompt component's ref callback, which guarantees the prompt instance is available when setting the initial text.

Resolves issue where forked sessions started with empty prompt input boxes.

Resolves #7257.

**Original Pull Request:** https://github.com/anomalyco/opencode/pull/7259 **State:** closed **Merged:** Yes --- Fixes regression where forking a session via /fork command or message dialog would not insert the selected message text into the prompt input box. The issue was a timing problem where the createEffect that handles route.initialPrompt ran before the prompt ref was assigned during component initialization. Now applies the initial prompt directly in the Prompt component's ref callback, which guarantees the prompt instance is available when setting the initial text. Resolves issue where forked sessions started with empty prompt input boxes. Resolves #7257.
yindo added the pull-request label 2026-02-16 18:17:14 -05:00
yindo closed this issue 2026-02-16 18:17:14 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#12320