(uri?: vscode.Uri)
| 10 | import { leetCodeSubmissionProvider } from "../webview/leetCodeSubmissionProvider"; |
| 11 | |
| 12 | export 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 | } |
nothing calls this directly
no test coverage detected