-
Notifications
You must be signed in to change notification settings - Fork 733
deps(vscode): temporarily de-bump min back to 1.68.0 #5747
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
Conversation
|
This pull request modifies code in src/ but no tests were added/updated. Confirm whether tests should be added or ensure the PR description explains why tests are not required. |
| } | ||
|
|
||
| // TODO: remove once version bump to 1.83.0 is complete. | ||
| export function setupVscodeVersionNotification() { |
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.
Do we need duplicate code?
AFAIK the null extension bug only impacts when running the extension in debug mode and not when its packaged into a vsix.
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.
Ah, not aware of that. I can remove the duplicate code in that case.
| } | ||
|
|
||
| if (notificationDisplayed) { | ||
| return |
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.
Will this ever run? Its always set to false on line 111.
Also it seems its only called once on activation anyways. This seems like more code than we need.
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.
I honestly wasn't sure, but I was using this as an example:
aws-toolkit-vscode/packages/amazonq/src/app/chat/activation.ts
Lines 77 to 107 in 7d6a975
| async function setupAuthNotification() { | |
| let notificationDisplayed = false // Auth Notification should be displayed only once. | |
| await tryShowNotification() | |
| async function tryShowNotification() { | |
| // Do not show the notification if the IDE starts and user is already authenticated. | |
| if (AuthUtil.instance.isConnected()) { | |
| notificationDisplayed = true | |
| } | |
| if (notificationDisplayed) { | |
| return | |
| } | |
| const source = 'authNotification' | |
| const buttonAction = 'Sign In' | |
| notificationDisplayed = true | |
| telemetry.toolkit_showNotification.emit({ | |
| component: 'editor', | |
| id: source, | |
| reason: 'notLoggedIn', | |
| result: 'Succeeded', | |
| }) | |
| const selection = await vscode.window.showWarningMessage('Start using Amazon Q', buttonAction) | |
| if (selection === buttonAction) { | |
| void amazonq.focusAmazonQPanel.execute(placeholder, source) | |
| } | |
| } | |
| } |
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.
That example sorta makes sense because the state of notificationDisplayed can change after its initialized but before evaluation. But regardless it is a such a confusing and unnecessary way to evaluate the message. IMO we should refactor that.
|
Oh darn, I should have mentioned I was working on this, see #5749 which also uses PromptSettings to store a "don't show again" |
|
|
||
| notificationDisplayed = true | ||
|
|
||
| telemetry.toolkit_showNotification.emit({ |
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.
seems like we should have a vscode.window.* wrapper in shared/utilities/messages.ts that emits this (maybe optional by a boolean flag). #5762
|
#5749 has PromptSettings + tests so let's continue with that. |
Problem
temporarily undo most of: #5704
Solution
Steps to re-bump to 1.83.0
To-do: retest with vsix to make sure null source is gone.
License: I confirm that my contribution is made under the terms of the Apache 2.0 license.