Repository navigation
Conversation
Connecting to an agent always opened an empty session, while the history sat behind the Agents view: connect, expand the agent, wait for the list, pick the session. Anyone who did not know that path saw an empty chat and assumed the work was gone. Connecting now asks the agent for the sessions of the current folder and continues the most recent one, replaying it through load or resume, whichever the agent advertises. A folder without sessions, an agent that cannot list or replay, and any failure along the way all fall back to a fresh session, so agents that do neither behave exactly as before. 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
Connecting to an agent always opened an empty session. The previous work sat behind the Agents view: connect, expand the agent, wait for the list to load, pick the session. Someone who does not know that path sees an empty chat and concludes the history is gone, which is what happened to me after a window reload.
The session list is also filtered by the workspace folder, which is the right behavior but makes an empty list ambiguous: it looks the same whether there is no history or whether the history belongs to another folder.
Change
Connecting asks the agent for the sessions of the current folder and continues the most recent one, replaying it through
session/loadorsession/resume, whichever the agent advertises. Load is preferred when both are available.Every path that cannot produce a session falls back to the previous behavior of creating a fresh one: an agent without
session/list, an agent that can neither load nor resume, a folder with no sessions, or a failure while listing. Agents that do none of this behave exactly as before.Testing
npm run lint,npm testandnpm run packagepass locally on Linux. Three tests cover the selection of the most recently updated session including the folder filter that is passed along, the preference for load when the agent advertises both, and the three fallbacks to a fresh session.Note
This pairs well with the session tabs PR, where an intentionally empty conversation is one click on the plus in the tab strip. It does not depend on it: without that PR, a new conversation is still reachable from the ACP: New Conversation command.