MCPcopy Create free account
hub / github.com/LeetCode-OpenSource/vscode-leetcode / createSession

Function createSession

src/commands/session.ts:92–106  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

90}
91
92async 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
108async function deleteSession(): Promise<void> {
109 const choice: IQuickItemEx<ISession | string> | undefined = await vscode.window.showQuickPick(

Callers 1

manageSessionsFunction · 0.85

Calls 2

createSessionMethod · 0.80

Tested by

no test coverage detected