diff --git a/apps/color-buddy/src/linting/EvalResponse.svelte b/apps/color-buddy/src/linting/EvalResponse.svelte index 08908bf..b3d4da1 100644 --- a/apps/color-buddy/src/linting/EvalResponse.svelte +++ b/apps/color-buddy/src/linting/EvalResponse.svelte @@ -30,17 +30,6 @@ function proposeFix(fixType: "ai" | "monte" | "heuristic") { requestState = "loading"; let hasRetried = false; - logEvent( - "lint-fix", - { - fixType, - errorName: lintProgram.name, - lintProgram: lintProgram.program, - palette: palette.colors.map((x) => x.toDisplay()), - background: palette.background.toDisplay(), - }, - $configStore.userName - ); const getFix = () => { let fix; if (fixType === "ai") { @@ -53,6 +42,18 @@ return fix.then((x) => { suggestions = [...suggestions, ...x]; requestState = "loaded"; + logEvent( + "lint-fix", + { + fixType, + errorName: lintProgram.name, + lintProgram: lintProgram.program, + palette: palette.colors.map((x) => x.toDisplay()), + background: palette.background.toDisplay(), + fix: x.map((y) => y.colors.map((z) => z.toDisplay())), + }, + $configStore.userName + ); }); }; @@ -124,7 +125,7 @@ Try to fix (AI) {/if} - {#if lintProgram.subscribedFix !== "none"} + {#if lintProgram.subscribedFix && lintProgram.subscribedFix !== "none"}