-
Notifications
You must be signed in to change notification settings - Fork 295
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
bug: Autocomplete rate limits display inconsistent error messages #2134
Comments
Can you clarify what exactly you mean by this?
If we don't do that, it will mean that a user will constantly see a warning color in their IDE when they code. Is this a better UX? |
I think keeping it as the warning color is probably ideal. Same as other autocompletion AI extensions when they're disabled. |
I think by "This causes the error messages to constantly be displayed in the quick pick view" @kalanchan is referring to the following (from the video in #2135): |
Oh I didn't see the PR! Looking. Thanks @toolmantim :) |
Marking as P0 (since this is part of the PLG flow) and "In Progress" given @kalanchan 's PR. |
Closes #2134 This bug has 2 parts to it: 1. Using the rate limited demo accounts, by design the headers `retry-after` return back the same time as when the request was made. This causes the error messages to constantly be displayed in the quick pick view 2. Also using the rate limited demo account, if you hard code the retry time to a later time (like 1 day after), the error message does not display anymore after being dismissed once. This PR adds a check to see whether or not the errors have been added in the `statusBar` and to display the rate limited error if no other `RateLimitError` is present. This also makes sure the error is only displayed once, instead of spamming the user if autocomplete keeps getting triggered. **Before (bug 1):** https://github.com/sourcegraph/cody/assets/51868853/de5a963a-a5be-4677-a75c-4f154960a516 **Before (bug2, after hardcoding a later `retry-after` date):** https://github.com/sourcegraph/cody/assets/51868853/ffcd7748-0827-4fca-b71f-e141112ead97 After: https://github.com/sourcegraph/cody/assets/51868853/48078429-59dc-4ad8-a744-efb1e665a689 ## Test plan - login to `https://sourcegraph.com` using the free demo account ([thread](https://sourcegraph.slack.com/archives/C066F85TE80/p1701712911448229?thread_ts=1700694252.150349&cid=C066F85TE80)) - go to any file, trigger autocompletes multiple times and you will see only 1 error message displayed - click on the error, dismiss it, and trigger another autocomplete. you should see another error message displayed <!-- Required. See https://docs.sourcegraph.com/dev/background-information/testing_principles. --> --------- Co-authored-by: Danny Tuppeny <danny@tuppeny.com>
Version
v0.17.1701788840
Describe the bug
This bug has 2 parts to it:
retry-after
return back the same time as when the request was made. This causes the error messages to constantly be displayed in the quick pick viewExpected behavior
Rate limit error message to only display once, and to display again even after dismissed
Additional context
No response
The text was updated successfully, but these errors were encountered: