From 589d025fa499cef6425703dcc5bdd15b72938e4e Mon Sep 17 00:00:00 2001 From: uinstinct <61635505+uinstinct@users.noreply.github.com> Date: Tue, 20 May 2025 14:47:36 +0530 Subject: [PATCH] move const declarations to top of file --- .../useMainEditorWebviewListeners.ts | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/gui/src/components/mainInput/TipTapEditor/useMainEditorWebviewListeners.ts b/gui/src/components/mainInput/TipTapEditor/useMainEditorWebviewListeners.ts index 97199940e..e878010e5 100644 --- a/gui/src/components/mainInput/TipTapEditor/useMainEditorWebviewListeners.ts +++ b/gui/src/components/mainInput/TipTapEditor/useMainEditorWebviewListeners.ts @@ -29,6 +29,14 @@ export function useMainEditorWebviewListeners({ inputId: string; editorFocusedRef: MutableRefObject; }) { + const activeContextProviders = useAppSelector( + (state) => state.config.config.contextProviders, + ); + const useCurrentFileAsContext = useAppSelector( + (state) => state.config.config.experimental?.useCurrentFileAsContext, + ); + const mode = useAppSelector((state) => state.session.mode); + useWebviewListener( "isContinueInputFocused", async () => { @@ -181,16 +189,6 @@ export function useMainEditorWebviewListeners({ [], ); - const activeContextProviders = useAppSelector( - (state) => state.config.config.contextProviders, - ); - const useCurrentFileAsContext = useAppSelector( - (state) => state.config.config.experimental?.useCurrentFileAsContext, - ); - const mode = useAppSelector((state) => state.session.mode); - - console.log("debug1 current file", useCurrentFileAsContext); - useWebviewListener( "newSession", async () => {