()
| 90 | } |
| 91 | |
| 92 | async function createSession(): Promise<void> { |
| 93 | const session: string | undefined = await vscode.window.showInputBox({ |
| 94 | prompt: "Enter the new session name.", |
| 95 | validateInput: (s: string): string | undefined => s && s.trim() ? undefined : "Session name must not be empty", |
| 96 | }); |
| 97 | if (!session) { |
| 98 | return; |
| 99 | } |
| 100 | try { |
| 101 | await leetCodeExecutor.createSession(session); |
| 102 | vscode.window.showInformationMessage("New session created, you can switch to it by clicking the status bar."); |
| 103 | } catch (error) { |
| 104 | await promptForOpenOutputChannel("Failed to create session. Please open the output channel for details.", DialogType.error); |
| 105 | } |
| 106 | } |
| 107 | |
| 108 | async function deleteSession(): Promise<void> { |
| 109 | const choice: IQuickItemEx<ISession | string> | undefined = await vscode.window.showQuickPick( |
no test coverage detected