Prevent going back to previous session when changing modes on a new initialized session#5357
Conversation
✅ Deploy Preview for continuedev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
|
@uinstinct thanks as always for the clear videos! I've noticed that a lot of your PRs have been great candidates for some of the improved testing setup we've worked on in the last week (e.g. https://github.com/continuedev/continue/blob/8ed59cfbc17169fca7d95e72f7e8da11b3fac4d4/gui/src/pages/history/history.test.tsx). In any future GUI-related changes, we'd love to see tests or if you find them difficult to write, please let me know! There's probably more work we can do to improve the tooling and feedback would be great |
|
Thanks @sestinj for your appreciation! errors when running e2e tests locally on the main branchwhen doing `npm run e2e:all` inside extensions/vscode, the following error pops upBTW, please feel free to tag me on fix or feat related issues. Happy to help and pick them up. Really like to work on Continue. |
|
@uinstinct I actually agree e2e tests are a bit unwieldy at the moment 😅 Luckily, there's a different and easier to work with testing suite that I'm referring to. If you run Recently I configured it so that you can mock the entire core/IDE, so most of the tests should be able to run very quickly and standalone. There's a good short example here, but I'll be working on better documentation in CONTRIBUTING.md very soon |
Description
This happens when we change the modes. Currently when we open a new session by clicking on the new session button, we go back to the previous session as we change mode from edit to chat/agent.
This should not happen because the user explicitly asked for a new chat session.
This PR fixes this by tracking when a new session was explicitly initialized then we do not go back to previous sessions on any mode change.
Checklist
Screenshots
before.mp4
after.mp4
Testing instructions