diff --git a/src/snyk/snykCode/views/suggestion/codeSuggestionWebviewProvider.ts b/src/snyk/snykCode/views/suggestion/codeSuggestionWebviewProvider.ts index 3d78a2215..87d9e8f8d 100644 --- a/src/snyk/snykCode/views/suggestion/codeSuggestionWebviewProvider.ts +++ b/src/snyk/snykCode/views/suggestion/codeSuggestionWebviewProvider.ts @@ -31,7 +31,7 @@ import { ICodeSuggestionWebviewProvider } from '../interfaces'; import { readFileSync } from 'fs'; import { TextDocument } from '../../../common/vscode/types'; import { Suggestion, SuggestionMessage } from './types'; -import { WebviewPanelSerializer } from '../../../common/views/webviewPanelSerializer'; +import { WebviewPanelSerializer } from '../../../snykCode/views/webviewPanelSerializer'; export class CodeSuggestionWebviewProvider extends WebviewProvider> diff --git a/src/snyk/snykCode/views/webviewPanelSerializer.ts b/src/snyk/snykCode/views/webviewPanelSerializer.ts new file mode 100644 index 000000000..4efcd11f3 --- /dev/null +++ b/src/snyk/snykCode/views/webviewPanelSerializer.ts @@ -0,0 +1,12 @@ +import * as vscode from 'vscode'; +import { WebviewProvider } from '../../../snyk/common/views/webviewProvider'; +import { Logger } from '../../common/logger/logger'; + +export class WebviewPanelSerializer, State> implements vscode.WebviewPanelSerializer { + constructor(private readonly provider: Provider) {} + async deserializeWebviewPanel(webviewPanel: vscode.WebviewPanel): Promise { + // we want to make sure the panel is closed on startup + webviewPanel.dispose(); + return Promise.resolve(); + } +}