fix(opencode): improve --continue behavior on empty projects #27776
Open
Arjith8 wants to merge 4 commits into
Open
fix(opencode): improve --continue behavior on empty projects #27776Arjith8 wants to merge 4 commits into
Arjith8 wants to merge 4 commits into
Conversation
validation will fail and user will be shown an "unexpected server error" message instead of say Session not found which is raised further down the line when validation doesn't fail.
…ly it was showing "Session not found: ses_dummy" error when the project was never used in the past
Contributor
|
The following comment was made by an LLM, it may be inaccurate: Based on my search, I found one potentially related PR: Related PR:
The current PR (27776) builds on this foundation by improving the user experience with a more informative message ("No previous sessions in this project") rather than just exiting with an error. |
it was not a great way
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.
Issue for this PR
Closes #25989
More like updates the solution
Type of change
What does this PR do?
It updates the behaviour for the -c flag, currently when we try to use -c on a project with no previous session we get a "Unexpected server error. Check server logs for details." which is raised due to the validation failing since we expect session to start with ses_ but our placeholder is dummy. The first commit updates placeholder to ses_dummy
The reason for 2nd commit is that when ses_dummy is used we are raising a error "Session not found: ses_dummy" to the user there is no ses_dummy ever created so I thought its a bit more UX wise better if we instead showed "No previous sessions in this project" instead.
How did you verify your code works?
Tested it locally, by using -c on a project with already existing previous session where it continued with the previous session as expected, while on a proj without prev session it rendered a toast with "No previous sessions in this project"
Screenshots / recordings
Checklist
If you do not follow this template your PR will be automatically rejected.