feat: update generate instruction
This commit is contained in:
parent
a89e85ecfa
commit
e0fb04b060
@ -101,6 +101,7 @@ function App() {
|
|||||||
|
|
||||||
function doGenerateCode(params: CodeGenerationParams) {
|
function doGenerateCode(params: CodeGenerationParams) {
|
||||||
setExecutionConsole([]);
|
setExecutionConsole([]);
|
||||||
|
setMistakesNum(0);
|
||||||
setAppState(AppState.CODING);
|
setAppState(AppState.CODING);
|
||||||
|
|
||||||
// Merge settings with params
|
// Merge settings with params
|
||||||
@ -133,8 +134,7 @@ function App() {
|
|||||||
setAppState(AppState.CODE_READY);
|
setAppState(AppState.CODE_READY);
|
||||||
setUpdateInstruction(instruction => {
|
setUpdateInstruction(instruction => {
|
||||||
setMistakesNum(calculateMistakesNum(instruction));
|
setMistakesNum(calculateMistakesNum(instruction));
|
||||||
handleInstructions(instruction);
|
return handleInstructions(instruction);
|
||||||
return instruction;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user