feat: branch conversations from selected text - #698
Merged
Conversation
Preserve reading-position restoration alongside quoted branch prompts and scope reading-position tests to outer message containers.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Add optional actions for selected conversation text: quote it into the current composer or ask about it in a new branch. Enable the feature in Settings > General; it defaults off and the preference is saved in the browser.
The new-branch action opens a compact composer that reuses ChatInput, the Send button, input-method handling, and draft restoration. It prefills an editable quote followed by "My question:". Sending creates the branch at the selected assistant response, navigates to it, and submits the prompt once. Opening or cancelling the composer creates no session, and failed submissions preserve the input.
The selection toolbar has labeled icons and 35px buttons. Both the toolbar and composer stay within the visible desktop or mobile viewport. The non-replacing
fork_branchRPC command and English, Simplified Chinese, and Traditional Chinese labels are included.Validation
npm test: 943 passing.npm run test:e2e: desktop and mobile history, branches, extension dialogs, chat appearance, and draft resizing passed.