-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cody: Persist error messages (#51762)
RE: #51759 Issue: error displaying as chat message will disappear all of a sudden without user action I noticed in the current implementation, errors resulted from failed streaming will replace the current assistant message, which would include the previous error message, or things that Cody has already response. This PR includes a fix where we will add the error message ON TOP of the current assistant message instead of overriding it. For example, instead of removing what Cody has replied and replace it with an error message, we now add the error message after what Cody has already answered `Hello! How can I help you?`: <img width="769" alt="image" src="https://github.com/sourcegraph/sourcegraph/assets/68532117/01862761-1aa3-4f33-94f7-6c2849eb78a3"> Other changes include: - Added a new `<ErrorBanner>` component that would show 5 of the last system error messages as a banner in chat UI (instead of 1, which override the previous one). - Now log all system error messages to debug logs (`"cody.debug": true`) view in UI <img width="1683" alt="Screenshot 2023-05-10 at 7 00 43 PM" src="https://github.com/sourcegraph/sourcegraph/assets/68532117/b09f0a27-bf70-4319-9c29-df2b4f5b6bf7"> <img width="622" alt="image" src="https://github.com/sourcegraph/sourcegraph/assets/68532117/ccdfaf57-8a13-49ab-8d85-5611b52f4a8e"> <img width="609" alt="image" src="https://github.com/sourcegraph/sourcegraph/assets/68532117/8a3800ce-c275-4d4d-845e-6306eecc2c91"> ## Test plan <!-- All pull requests REQUIRE a test plan: https://docs.sourcegraph.com/dev/background-information/testing_principles --> See screenshots above
- Loading branch information
Showing
5 changed files
with
42 additions
and
19 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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