From e5f4105f0214c466c128ac5accc2803e7e3d1bd3 Mon Sep 17 00:00:00 2001 From: nvms Date: Mon, 4 Dec 2023 11:29:16 -0500 Subject: [PATCH] don't destroy everybody's state :) --- extension/dist/extension.umd.js | 5 ++++- extension/src/extension.ts | 6 +++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/extension/dist/extension.umd.js b/extension/dist/extension.umd.js index 269fbdf..351ce5d 100644 --- a/extension/dist/extension.umd.js +++ b/extension/dist/extension.umd.js @@ -5968,7 +5968,10 @@ var promptSetProviderKey = async (provider) => { }; function activate(context) { State.create(context); - createState(); + const stateCreated = State.get(stateKeys.stateCreated()); + if (!stateCreated) { + createState(); + } try { const setApiKeyCommand = vscode6.commands.registerCommand("wingman.setApiKey", async () => { const selectedProvider = await vscode6.window.showQuickPick( diff --git a/extension/src/extension.ts b/extension/src/extension.ts index a30851e..0a96312 100644 --- a/extension/src/extension.ts +++ b/extension/src/extension.ts @@ -90,11 +90,11 @@ export const promptSetProviderKey = async (provider: string) => { export function activate(context: vscode.ExtensionContext) { State.create(context); - // const stateCreated = State.get(stateKeys.stateCreated()); + const stateCreated = State.get(stateKeys.stateCreated()); - // if (!stateCreated) { + if (!stateCreated) { createState(); - // } + } // Then decide to show the welcome wizard. // const showWizard = State.get(stateKeys.welcomeWizard());