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

fix: show error after Cody response in chat UI #2566

Merged
merged 2 commits into from
Jan 4, 2024
Merged

Conversation

abeatrix
Copy link
Contributor

@abeatrix abeatrix commented Jan 4, 2024

image

This PR addresses the issue mentioned in #2539, where long response from chat gpt 4.0 will resulted in error, and the error message will replace the response text from Cody.

  • Display error message in additional to the text that cody has already responded
  • Add new styles for .request-error and .request-error-title classes.
  • Update ErrorItem.tsx to use new CSS classes for request error display.

Test plan

  1. Switch chat to use chat gpt 4.0
  2. Open a large file and select the whole file
  3. Run the /test command
  4. If the response is longer than the answer limit, it should display an error message after the text that Cody has already responsed
  • before: the text will be replaced with the error message

Demo

Before

Screen.Recording.2024-01-04.at.9.59.38.AM.mov

https://www.loom.com/share/2136a5de267d4c21849b735bb38619d9?sid=b8d8652e-2bba-4498-bcf6-aec9c2c9a0cc

After

Error message will not replace the text that's already returned by the LLM

image

https://www.loom.com/share/3e183dfec7f940079100b48e519235eb?sid=2e55abad-e4d4-4ba0-8a6a-05078f48ef0a

@abeatrix abeatrix requested review from chwarwick and a team January 4, 2024 18:02
Copy link
Contributor

@chwarwick chwarwick left a comment

Choose a reason for hiding this comment

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

This makes sense to me

@abeatrix abeatrix merged commit 632578b into main Jan 4, 2024
18 checks passed
@abeatrix abeatrix deleted the bee/fix-chat-error branch January 4, 2024 18:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants