Skip to content

Commit 4736298

Browse files
committed
feat(amazonq): Notify users to reload when amazonqLSP experiment flag has changed
1 parent 93a41af commit 4736298

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

packages/amazonq/src/extension.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,23 @@ export async function activateAmazonQCommon(context: vscode.ExtensionContext, is
154154
void focusAmazonQPanel.execute(placeholder, 'firstStartUp')
155155
}, 1000)
156156
}
157+
158+
context.subscriptions.push(
159+
Experiments.instance.onDidChange(async (event) => {
160+
if (event.key === 'amazonqLSP') {
161+
await vscode.window
162+
.showInformationMessage(
163+
'Amazon Q LSP setting has changed. Please reload VS Code for the changes to take effect.',
164+
'Reload Now'
165+
)
166+
.then(async (selection) => {
167+
if (selection === 'Reload Now') {
168+
await vscode.commands.executeCommand('workbench.action.reloadWindow')
169+
}
170+
})
171+
}
172+
})
173+
)
157174
}
158175

159176
export async function deactivateCommon() {

0 commit comments

Comments
 (0)