Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cody: Persist error messages #51762

Merged
merged 2 commits into from
May 11, 2023
Merged

Cody: Persist error messages #51762

merged 2 commits into from
May 11, 2023

Conversation

abeatrix
Copy link
Contributor

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?:
image

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
Screenshot 2023-05-10 at 7 00 43 PM image image

Test plan

See screenshots above

@cla-bot cla-bot bot added the cla-signed label May 11, 2023
@abeatrix abeatrix requested a review from a team May 11, 2023 02:34
@sourcegraph-buildkite
Copy link
Collaborator

Bundle size report 📦

Initial size Total size Async size Modules
0.00% (0.00 kb) 0.00% (+0.14 kb) 0.00% (+0.14 kb) 0.00% (0)

Look at the Statoscope report for a full comparison between the commits 6faf323 and a9917a7 or learn more.

Open explanation
  • Initial size is the size of the initial bundle (the one that is loaded when you open the page)
  • Total size is the size of the initial bundle + all the async loaded chunks
  • Async size is the size of all the async loaded chunks
  • Modules is the number of modules in the initial bundle

@sourcegraph-bot
Copy link
Contributor

📖 Storybook live preview

Copy link
Contributor

@philipp-spiess philipp-spiess left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! LGTM. I'll merge this right away so I can base some of the other fixes on top of it. Thanks so much!

@philipp-spiess philipp-spiess merged commit 9b7db99 into main May 11, 2023
24 checks passed
@philipp-spiess philipp-spiess deleted the bee/cody-error-bugs branch May 11, 2023 10:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants