diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 1b367ad..6afc174 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -184,6 +184,8 @@ function App({ navbarComponent }: Props) { }; const cancelCodeGeneration = () => { + addEvent("Cancel"); + wsRef.current?.close?.(USER_CLOSE_WEB_SOCKET_CODE); // make sure stop can correct the state even if the websocket is already closed cancelCodeGenerationAndReset(); @@ -289,6 +291,7 @@ function App({ navbarComponent }: Props) { setReferenceImages(referenceImages); setInputMode(inputMode); if (referenceImages.length > 0) { + addEvent("Create"); await doGenerateCode( { generationType: "create",