Repository navigation
Conversation
A new conversation went through disconnectAgent, which killed the agent process and started a fresh one, so whatever the agent was working on died with it. An agent keeps every session of a connection, so a new conversation now opens another session on the connection that is already there. The chat grew a tab strip: one tab per live session, a dot on the ones that are working, and a plus button for another conversation. Switching repaints the chat from the updates the client buffered for that session, so a tab that kept running shows what happened while it was in the background. The prompt lifecycle is tracked per session, so a turn that ends in a background tab no longer clears the spinner of the tab on screen. Loading a stored session keeps live sessions around instead of dropping them, and disconnecting an agent ends all of its sessions. The confirmation before a new conversation is gone with the reason for it. Signed-off-by: moep90 <volleyballlive@googlemail.com>
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.
Problem
SessionManager.newConversation()went throughdisconnectAgent(), which callskillAgent(). Starting another conversation therefore killed the agent process and spawned a fresh one, so whatever the agent was working on died with it. There was no way to let one conversation finish while starting another.Nothing in ACP requires that. An agent keeps every session of a connection, and the protocol documents concurrent sessions per agent.
Change
A new conversation now opens another session on the connection that is already there. The process is only replaced when the connection is actually gone.
The chat grew a tab strip above the banner: one tab per live session, a dot on the ones that are working, and a plus for another conversation. Switching repaints the chat from the session updates the client buffered for that session, capped at 5000 updates per session, so a tab that kept running shows what happened while it was in the background.
The prompt lifecycle is tracked per session, so a turn that ends in a background tab no longer clears the spinner of the tab on screen. Loading a stored session keeps live sessions instead of dropping them, and disconnecting an agent ends all of its sessions rather than only the one the pointer happened to hold.
The confirmation before a new conversation is gone together with the reason for it: nothing is discarded any more.
Testing
npm run lint,npm testandnpm run packagepass locally on Linux. Four tests cover it: a new conversation leaves the running session alive and kills no process, switching back to a live session needs no replay from the agent, disconnecting drops every session of that agent, and the tab strip renders the busy and active state and reports the clicked session.Note on overlap
The test file brings its own JSDOM harness and adds jsdom to the dev dependencies, as #56 and #64 do. Whichever lands first, I am happy to rebase onto it and drop the duplicate harness.