Skip to content

Conversation

@ariane-emory
Copy link
Contributor

This PR adjusts the behaviour when forking a session so that the text of the message on which the session is being forked is reinserted in the prompt text input box.

This improves ergonomics and can save two clicks and a keystroke by eliminating the need for the currently-common pattern of copying a message (two clicks) before forking on it so that you can begin the fork using a modified version of that message (one keystroke to past the copied message back into the prompt text input box).

Resolves #5495.

Add initialPrompt support to SessionRoute to populate input box with
selected message content when forking a session.

- Extend SessionRoute type to support optional initialPrompt
- Add effect in session component to handle initial prompt from fork
- Modify fork action to extract message content and pass it to new session

Fixes anomalyco#5495
@ariane-emory ariane-emory changed the title feat(tui): retain prompt text input contents when forking sessions (resolves #5495) feat(tui): reinsert forked message in prompt text input box when forking session (resolves #5495) Dec 15, 2025
@ariane-emory ariane-emory changed the title feat(tui): reinsert forked message in prompt text input box when forking session (resolves #5495) feat(tui): reinsert forked message text in prompt text input box when forking session (resolves #5495) Dec 15, 2025
@rekram1-node
Copy link
Collaborator

/review

…e.tsx

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@ariane-emory
Copy link
Contributor Author

The bot's change introduced an error :( Fixing presently.

- Remove duplicate conflicting code in dialog-message.tsx that caused a
  syntax error from a bad merge
- Add initialPrompt support to dialog-fork-from-timeline.tsx so the
  /fork command also retains the message text in the prompt input box
@ariane-emory
Copy link
Contributor Author

Fixed.

@ariane-emory
Copy link
Contributor Author

@rekram1-node Should be ready to come in for a safe landing now, yeah?

@rekram1-node rekram1-node merged commit 755ddbb into anomalyco:dev Dec 20, 2025
2 checks passed
@ariane-emory ariane-emory deleted the feat/retain-prompt-when-forking branch December 20, 2025 22:49
rekram1-node pushed a commit that referenced this pull request Dec 27, 2025
… forking session (resolves #5495) (#5545)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Forking a message should retain the input like in /undo

2 participants