From 2e4c3692dd40f4fa8cee39f741deb0efe121e17e Mon Sep 17 00:00:00 2001 From: Matt Lee Date: Sun, 17 Nov 2024 21:01:40 -0500 Subject: [PATCH] fix(amazonq): fixed bug with high CPU use event loop for security scan findings --- .../codewhisperer/views/securityIssue/securityIssueWebview.ts | 3 ++- .../core/src/codewhisperer/views/securityIssue/vue/root.vue | 3 --- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/packages/core/src/codewhisperer/views/securityIssue/securityIssueWebview.ts b/packages/core/src/codewhisperer/views/securityIssue/securityIssueWebview.ts index 2e49527eeab..a61508a09b2 100644 --- a/packages/core/src/codewhisperer/views/securityIssue/securityIssueWebview.ts +++ b/packages/core/src/codewhisperer/views/securityIssue/securityIssueWebview.ts @@ -74,7 +74,8 @@ const Panel = VueWebview.compilePanel(SecurityIssueWebview) let activePanel: InstanceType | undefined export async function showSecurityIssueWebview(ctx: vscode.ExtensionContext, issue: CodeScanIssue, filePath: string) { - activePanel ??= new Panel(ctx) + // always create a new panel per finding + activePanel = new Panel(ctx) activePanel.server.setIssue(issue) activePanel.server.setFilePath(filePath) diff --git a/packages/core/src/codewhisperer/views/securityIssue/vue/root.vue b/packages/core/src/codewhisperer/views/securityIssue/vue/root.vue index 290e5bbfee7..6e8e9889ea9 100644 --- a/packages/core/src/codewhisperer/views/securityIssue/vue/root.vue +++ b/packages/core/src/codewhisperer/views/securityIssue/vue/root.vue @@ -129,9 +129,6 @@ export default defineComponent({ created() { this.getData() }, - updated() { - this.getData() - }, methods: { async getData() { const issue = await client.getIssue()