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: Do not flicker error messages when aborting during context fetching #54429

Merged
merged 2 commits into from
Jun 29, 2023

Conversation

philipp-spiess
Copy link
Contributor

@philipp-spiess philipp-spiess commented Jun 29, 2023

Closes #54427

During context fetching if we abort the request before we ever got a response from the server, we get a message with the text socket hang up in addition to the aborted error when responses are always streaming in.

With the recent changes from me to properly bubble up context fetching errors, these messages became visible in some unintended ways:

image

This PR fixes the issue by handling both abort and socket hang up messages.

Test plan

  • tested locally with both indexed and unindexed repos. Just send a message and press abort.

@philipp-spiess philipp-spiess requested review from abeatrix and a team June 29, 2023 12:30
@philipp-spiess philipp-spiess self-assigned this Jun 29, 2023
@cla-bot cla-bot bot added the cla-signed label Jun 29, 2023
@github-actions github-actions bot added the team/code-exploration Issues owned by the Code Exploration team label Jun 29, 2023
@deepak2431
Copy link
Contributor

@philipp-spiess Opened a issue here which you can link for this #54427

@philipp-spiess
Copy link
Contributor Author

@deepak2431 machine! thank you :)

How do you stay in touch with all the changes? Are you subscribed to the repo? 😱

@sourcegraph-bot
Copy link
Contributor

📖 Storybook live preview

@deepak2431
Copy link
Contributor

@philipp-spiess You're welcome :)
No, I am not subscribed to the repo. Just use it check it in between to see what's going on with Cody!

Copy link
Contributor

@abeatrix abeatrix left a comment

Choose a reason for hiding this comment

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

Haven't tested but the code lgtm 😀

@philipp-spiess
Copy link
Contributor Author

Haven't tested

we test in prod 😎

@philipp-spiess philipp-spiess merged commit 79bddb9 into main Jun 29, 2023
24 of 25 checks passed
@philipp-spiess philipp-spiess deleted the ps/cody-fix-context-abort branch June 29, 2023 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed team/code-exploration Issues owned by the Code Exploration team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cody: Stop generating button shows error
4 participants