-
Notifications
You must be signed in to change notification settings - Fork 213
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: Don't init when not logged in and add UI to show that to users #970
Conversation
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.
Nice! 👍🏼 on the UX
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 good!
I think the AuthProvider publishes a variable, cody.activated, when it is authed. We could make some of these indicators declarative.
} | ||
// Reload autocomplete if either the configuration changes or the auth status is updated | ||
vscode.workspace.onDidChangeConfiguration(event => { | ||
if (event.affectsConfiguration('cody.autocomplete')) { |
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.
Alternatively, I think you could have dependend on the cody.activated
state. I believe the AuthProvider flips that (or tries to) when auth changes.
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.
Oh I see this is using this feature but couldn't find out how we can listen to these changes in code. I think this API is only for config changes but maybe I’m missing something? I'll merge this as-is but happy to change this if you find a nice way!
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.
@philipp-spiess Yes, unfortunately you can't listen to these in code. But for making UX changes you can use when
/enablement
to do that declaratively.
Closes #928
Avoid setting up autocomplete when the user is not signed in and log the states properly to the UI.
Test plan
Screen.Recording.2023-09-07.at.13.35.06.mov