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

Function submitSolution

src/commands/submit.ts:12–32  ·  view source on GitHub ↗
(uri?: vscode.Uri)

Source from the content-addressed store, hash-verified

10import { leetCodeSubmissionProvider } from "../webview/leetCodeSubmissionProvider";
11
12export async function submitSolution(uri?: vscode.Uri): Promise<void> {
13 if (!leetCodeManager.getUser()) {
14 promptForSignIn();
15 return;
16 }
17
18 const filePath: string | undefined = await getActiveFilePath(uri);
19 if (!filePath) {
20 return;
21 }
22
23 try {
24 const result: string = await leetCodeExecutor.submitSolution(filePath);
25 leetCodeSubmissionProvider.show(result);
26 } catch (error) {
27 await promptForOpenOutputChannel("Failed to submit the solution. Please open the output channel for details.", DialogType.error);
28 return;
29 }
30
31 leetCodeTreeDataProvider.refresh();
32}

Callers

nothing calls this directly

Calls 7

promptForSignInFunction · 0.90
getActiveFilePathFunction · 0.90
getUserMethod · 0.80
submitSolutionMethod · 0.80
showMethod · 0.45
refreshMethod · 0.45

Tested by

no test coverage detected