summaryrefslogtreecommitdiff
path: root/extension/src/extension.ts
blob: de8f55e3a9217706e45e92f01710f3bc2da88fc7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
/**
 * This is the entry point for the extension.
 */

import * as vscode from "vscode";
import {
  isPythonEnvSetup,
  startContinuePythonServer,
} from "./activation/environmentSetup";

async function dynamicImportAndActivate(
  context: vscode.ExtensionContext,
  showTutorial: boolean
) {
  const { activateExtension } = await import("./activation/activate");
  await activateExtension(context, showTutorial);
}

export function activate(context: vscode.ExtensionContext) {
  // Only show progress if we have to setup
  vscode.window.withProgress(
    {
      location: vscode.ProgressLocation.Notification,
      title: "Setting up Continue extension...",
      cancellable: false,
    },
    async () => {
      dynamicImportAndActivate(context, true);
    }
  );
}