feat: added syntax check

This commit is contained in:
2026-02-23 21:38:12 +01:00
parent e68e845e70
commit 7cc2f7cab2
14 changed files with 507 additions and 10 deletions

View File

@@ -20,13 +20,28 @@ export type PythonWorkerRequest =
requestId: string;
code: string;
cacheKey?: string;
}
| {
type: 'syntaxCheck';
requestId: string;
code: string;
cacheKey?: string;
};
export interface PythonSyntaxError {
line: number;
column: number;
endLine: number;
endColumn: number;
message: string;
}
export type PythonWorkerMessage =
| { type: 'ready' }
| { type: 'error'; error: string }
| { type: 'stdout'; requestId: string; chunk: string }
| { type: 'runResult'; requestId: string; result: string }
| { type: 'entrypoints'; requestId: string; entrypoints: string[] }
| { type: 'syntaxResult'; requestId: string; errors: PythonSyntaxError[] }
| { type: 'macroResult'; requestId: string; result: MacroResultV1 }
| { type: 'runError'; requestId: string; error: string };