From 871bd0b89a25222c69fbbf8b270d3d0c6f6cc82b Mon Sep 17 00:00:00 2001 From: Victor Nogueira Date: Fri, 10 Jul 2026 23:18:11 -0300 Subject: [PATCH 1/2] Remove searchResultsToConsider setting and hardcode to 6 - Remove the slider from AI settings UI - Remove searchResultsToConsider from defaultSettings - Always wait for search results in canStartResponding() - Hardcode .slice(0, 6) in text generation and chat interface - Update tests and documentation --- .../components/AiResponse/ChatInterface.tsx | 5 +--- .../Main/Menu/AISettings/AISettingsForm.tsx | 27 +------------------ client/modules/settings.test.ts | 1 - client/modules/settings.ts | 1 - client/modules/textGeneration.ts | 4 +-- client/modules/textGenerationUtilities.ts | 6 ++--- docs/ai-integration.md | 2 -- docs/configuration.md | 1 - docs/overview.md | 2 +- 9 files changed, 6 insertions(+), 43 deletions(-) diff --git a/client/components/AiResponse/ChatInterface.tsx b/client/components/AiResponse/ChatInterface.tsx index ac675fd7..f10f4db6 100644 --- a/client/components/AiResponse/ChatInterface.tsx +++ b/client/components/AiResponse/ChatInterface.tsx @@ -21,7 +21,6 @@ import { chatGenerationStatePubSub, chatInputPubSub, followUpQuestionPubSub, - getSettings, imageSearchResultsPubSub, queryPubSub, settingsPubSub, @@ -297,9 +296,7 @@ export default function ChatInterface({ ([, , url]) => !existingUrls.has(url), ); - updateLlmTextSearchResults( - freshResults.slice(0, getSettings().searchResultsToConsider), - ); + updateLlmTextSearchResults(freshResults.slice(0, 6)); if (uniqueFreshResults.length > 0) { const updatedResults = [ diff --git a/client/components/Pages/Main/Menu/AISettings/AISettingsForm.tsx b/client/components/Pages/Main/Menu/AISettings/AISettingsForm.tsx index 625bdea0..7b44f22b 100644 --- a/client/components/Pages/Main/Menu/AISettings/AISettingsForm.tsx +++ b/client/components/Pages/Main/Menu/AISettings/AISettingsForm.tsx @@ -1,8 +1,7 @@ -import { Select, Slider, Stack, Switch, Text, TextInput } from "@mantine/core"; +import { Select, Stack, Switch, Text, TextInput } from "@mantine/core"; import { useForm } from "@mantine/form"; import { notifications } from "@mantine/notifications"; import { usePubSub } from "create-pubsub/react"; -import { useMemo } from "react"; import { requestNotificationPermission } from "@/modules/notifications"; import { settingsPubSub } from "@/modules/pubSub"; import { inferenceTypes } from "@/modules/settings"; @@ -25,15 +24,6 @@ export default function AISettingsForm() { onValuesChange: setSettings, }); - const searchResultsToConsiderSliderMarks = useMemo( - () => - Array.from({ length: 7 }, (_, index) => ({ - value: index, - label: index.toString(), - })), - [], - ); - const handleNotificationToggle = async ( event: React.ChangeEvent, ) => { @@ -75,21 +65,6 @@ export default function AISettingsForm() { description="Show a browser notification when the AI response is ready. Useful for longer queries that take time to process." /> - - Search results to consider - - Determines the number of search results to consider when - generating AI responses. A higher value may enhance accuracy, but - it will also increase response time. - - - -