agent_ui: Improve quote selections to consider message being edited #39947
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.
AcpThreadView.insert_selectionsto take into account whetherthe user is currently editing an existing message and, if it is, insert
the selection into that message instead of the thread's message editor
agent::QuoteSelectionaction instead of the deprecated
assistant::QuoteSelectionactionAcpThreadView.active_editorto allow callers to retrieveeither the thread view's message editor or the editor for the message
being edited, in case
AcpThreadView.editing_messageis notNoneAcpThreadView.focus_handleto focus on the message beingcurrently edited in case the user navigates back to the editor and then
to the thread view again, all while editing a message
AcpThreadView.insert_selections, ensuring that theselection is inserted in the message being currently edited, if a
message is being edited, or the thread view's message editor if no
message is being edited
Closes #39693
Release Notes:
agent: quote selectionto also work for a message that was already sent but is being edited