-
Notifications
You must be signed in to change notification settings - Fork 209
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
Autocomplete: Surface rate limit and other errors #851
Conversation
@toolmantim Please take a look at the attached video if this workflow makes sense for you. I've decided to add it to the same quick pick that the status bar item always opens (which is different from your UI sketches). The rest should be fairly similar. |
} | ||
|
||
const DEFAULT_TEXT = '$(cody-logo-heavy)' | ||
const DEFAULT_TOOLTIP = 'Cody Settings' | ||
|
||
const QUICK_PICK_ITEM_CHECKED_PREFIX = '$(check) ' | ||
const QUICK_PICK_ITEM_EMPTY_INDENT_PREFIX = '\u00A0\u00A0\u00A0\u00A0 ' | ||
const QUICK_PICK_ITEM_EMPTY_INDENT_PREFIX = '\u00A0\u00A0\u00A0\u00A0\u00A0 ' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@toolmantim For me the existing indentation looked a bit too narrow:
Before
![Screenshot 2023-08-29 at 14 56 56](https://private-user-images.githubusercontent.com/458591/264025853-08f38926-b61b-4f30-83e5-bb77d853cdb8.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTkxNzAxMDgsIm5iZiI6MTcxOTE2OTgwOCwicGF0aCI6Ii80NTg1OTEvMjY0MDI1ODUzLTA4ZjM4OTI2LWI2MWItNGYzMC04M2U1LWJiNzdkODUzY2RiOC5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwNjIzJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC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Fl1y1FaaIT8m_uvuAMxjG0nIEe2Hm5his)
But maybe that's different for other themes?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1,13 +1,13 @@ | |||
import { LRUCache } from 'lru-cache' | |||
import * as vscode from 'vscode' | |||
|
|||
import { isAbortError, isRateLimitError } from '@sourcegraph/cody-shared/src/sourcegraph-api/errors' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💜
d5c0afc
to
1cd432a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
I put up a quick docs addition in sourcegraph/sourcegraph#56304 so we can link to there in stead of the blog.
Co-authored-by: Tim Lucas <t@toolmantim.com>
@toolmantim @valerybugakov Quick update: I decided to only surface rate limiting errors for now until we resolve https://sourcegraph.slack.com/archives/C05AGQYD528/p1693473094573439?thread_ts=1693471486.690459&cid=C05AGQYD528 This would be too much spam otherwise and definitely not a loveable experience |
Closes #634
This PR adds a UI indicator for autocomplete errors. We special case rate limiting errors to provider more information.
error
API similar to thedebug
one but that will always log errors to the output channel.ToDo
error
API similar to thedebug
one but that will always log errors to the output channel.Test plan
Screen.Recording.2023-08-29.at.14.04.23.mov