MCPcopy Index your code
hub / github.com/LeetCode-OpenSource/vscode-leetcode / promptForSignIn

Function promptForSignIn

src/utils/uiUtils.ts:38–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

36}
37
38export async function promptForSignIn(): Promise<void> {
39 const choice: vscode.MessageItem | undefined = await vscode.window.showInformationMessage(
40 "Please sign in to LeetCode.",
41 DialogOptions.yes,
42 DialogOptions.no,
43 DialogOptions.singUp,
44 );
45 switch (choice) {
46 case DialogOptions.yes:
47 await vscode.commands.executeCommand("leetcode.signin");
48 break;
49 case DialogOptions.singUp:
50 if (getLeetCodeEndpoint()) {
51 openUrl("https://leetcode.cn");
52 } else {
53 openUrl("https://leetcode.com");
54 }
55 break;
56 default:
57 break;
58 }
59}
60
61export async function promptHintMessage(config: string, message: string, choiceConfirm: string, onConfirm: () => Promise<any>): Promise<void> {
62 if (getWorkspaceConfiguration().get<boolean>(config)) {

Callers 4

switchEndpointFunction · 0.90
submitSolutionFunction · 0.90
getSessionListFunction · 0.90
searchProblemFunction · 0.90

Calls 2

getLeetCodeEndpointFunction · 0.90
openUrlFunction · 0.85

Tested by

no test coverage detected