From aed7e3dacf0d1da85e9b8d15d1bdf1862dab48e9 Mon Sep 17 00:00:00 2001 From: Abi Raja Date: Thu, 18 Apr 2024 12:59:32 -0400 Subject: [PATCH] instrument cancel and create --- frontend/src/App.tsx | 3 +++ 1 file changed, 3 insertions(+) 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",