()
| 36 | } |
| 37 | |
| 38 | export 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 | |
| 61 | export async function promptHintMessage(config: string, message: string, choiceConfirm: string, onConfirm: () => Promise<any>): Promise<void> { |
| 62 | if (getWorkspaceConfiguration().get<boolean>(config)) { |
no test coverage detected