instrument cancel and create

This commit is contained in:
Abi Raja 2024-04-18 12:59:32 -04:00
parent 07fc02a15d
commit aed7e3dacf

View File

@ -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",