feat: Support viewport history navigation while streaming#464
Open
liaowang11 wants to merge 1 commit intoxenodium:mainfrom
Open
feat: Support viewport history navigation while streaming#464liaowang11 wants to merge 1 commit intoxenodium:mainfrom
liaowang11 wants to merge 1 commit intoxenodium:mainfrom
Conversation
When a user switches the viewport to view previous interactions while a response is actively streaming, we should support navigating the history without interrupting the stream. This change implements the following: 1. Adds `agent-shell-viewport--showing-latest-p` to check if the viewport is on the latest interaction. 2. Skips echoing stream updates (text, fragments) to the viewport buffer if it is currently viewing a historical interaction. 3. Allows `agent-shell-viewport-edit-mode` (and `agent-shell-viewport-next-page`) to be used while the agent is busy.
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.
When a user switches the viewport to view previous interactions while a response is actively streaming, we should support navigating the history without interrupting the stream.
I find this is most useful when preparing for followup questions while the agents are busy working.
This change implements the following:
agent-shell-viewport--showing-latest-pto check if the viewport is on the latest interaction.agent-shell-viewport-next-pageto be used while the agent is busy.Related: #433
Checklist
M-x checkdocandM-x byte-compile-file.Verification Notes
checkdocreports one existing warning atagent-shell.el:2373.agent-shell--build-content-blocks-binary-file-testandagent-shell-restart-preserves-default-directory.