Elffuss BraidHub

kikocis/continue public

95c91a48de4e · 609 BRawPermalink
1import * as vscode from "vscode";
2
3export function showFreeTrialLoginMessage(
4 message: string,
5 reloadConfig: () => void,
6 openOnboardingCard: () => void,
7) {
8 vscode.window
9 .showInformationMessage(message, "Sign In", "Use API key / local model")
10 .then((selection) => {
11 if (selection === "Sign In") {
12 vscode.authentication
13 .getSession("github", [], {
14 createIfNone: true,
15 })
16 .then(() => {
17 reloadConfig();
18 });
19 } else if (selection === "Use API key / local model") {
20 openOnboardingCard();
21 }
22 });
23}