From a99d99bbd8bca47fc33db348ef2f3c0ecc1d6d83 Mon Sep 17 00:00:00 2001 From: Andrew Michael McNutt Date: Tue, 15 Oct 2024 06:19:41 -0600 Subject: [PATCH] Allow AI Mute --- apps/color-buddy/src/controls/AddColor.svelte | 3 +++ apps/color-buddy/src/controls/Config.svelte | 1 + apps/color-buddy/src/controls/DesignPit.svelte | 9 +++++++-- apps/color-buddy/src/lib/api-calls.ts | 3 ++- .../src/linting/LintToolTipContents.svelte | 11 +++++++---- 5 files changed, 20 insertions(+), 7 deletions(-) diff --git a/apps/color-buddy/src/controls/AddColor.svelte b/apps/color-buddy/src/controls/AddColor.svelte index 1c4b79e..b5bf979 100644 --- a/apps/color-buddy/src/controls/AddColor.svelte +++ b/apps/color-buddy/src/controls/AddColor.svelte @@ -15,6 +15,9 @@ let requestState: "idle" | "loading" | "loaded" | "failed" = "idle"; function getColorForSearch(searchedString: string) { + if ($configStore.engine === "none") { + return; + } const allowedStates = new Set(["idle", "loaded", "failed"]); if (!allowedStates.has(requestState)) { return; diff --git a/apps/color-buddy/src/controls/Config.svelte b/apps/color-buddy/src/controls/Config.svelte index 563dc11..fabae1e 100644 --- a/apps/color-buddy/src/controls/Config.svelte +++ b/apps/color-buddy/src/controls/Config.svelte @@ -12,6 +12,7 @@ // "google", "openai", "anthropic", + "none", ] as string[]; const isMac = navigator.userAgent.indexOf("Mac OS X") !== -1; diff --git a/apps/color-buddy/src/controls/DesignPit.svelte b/apps/color-buddy/src/controls/DesignPit.svelte index 5a42a1d..c935f51 100644 --- a/apps/color-buddy/src/controls/DesignPit.svelte +++ b/apps/color-buddy/src/controls/DesignPit.svelte @@ -1,6 +1,7 @@