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

Autocomplete: Don't init when not logged in and add UI to show that to users #970

Merged
merged 5 commits into from
Sep 8, 2023

Conversation

philipp-spiess
Copy link
Contributor

@philipp-spiess philipp-spiess commented Sep 7, 2023

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

@philipp-spiess philipp-spiess requested review from a team and toolmantim September 7, 2023 11:38
Copy link
Contributor

@toolmantim toolmantim left a 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

@philipp-spiess philipp-spiess requested a review from a team September 7, 2023 12:13
Copy link
Contributor

@dominiccooney dominiccooney left a 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')) {
Copy link
Contributor

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.

Copy link
Contributor Author

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!

Copy link
Contributor

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.

@philipp-spiess philipp-spiess merged commit 5a528ca into main Sep 8, 2023
10 checks passed
@philipp-spiess philipp-spiess deleted the ps/ac-signed-out-notifyu branch September 8, 2023 15:31
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.

Autocomplete: Improve sad users metrics
3 participants