From b54b4feb78187fa99507eaf4b45fa55001dc704b Mon Sep 17 00:00:00 2001 From: Nate Date: Wed, 20 Nov 2024 15:16:22 -0800 Subject: [PATCH] remove unecessary if statement --- gui/src/hooks/useChatHandler.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/gui/src/hooks/useChatHandler.ts b/gui/src/hooks/useChatHandler.ts index c332be793..28b1add9a 100644 --- a/gui/src/hooks/useChatHandler.ts +++ b/gui/src/hooks/useChatHandler.ts @@ -191,13 +191,7 @@ function useChatHandler(dispatch: Dispatch, ideMessenger: IIdeMessenger) { dispatch(setCurCheckpointIndex(Math.floor(index / 2))); } - const shouldGatherContext = - modifiers.useCodebase || hasSlashCommandOrContextProvider(editorState); - - if (shouldGatherContext) { - dispatch(setIsGatheringContext(true)); - } - + dispatch(setIsGatheringContext(true)); // Resolve context providers and construct new history const [selectedContextItems, selectedCode, content] = await resolveEditorContent( @@ -212,7 +206,6 @@ function useChatHandler(dispatch: Dispatch, ideMessenger: IIdeMessenger) { // Automatically use currently open file if (!modifiers.noContext) { const usingFreeTrial = defaultModel?.provider === "free-trial"; - const currentFile = await ideMessenger.ide.getCurrentFile(); if (currentFile) { let currentFileContents = currentFile.contents;