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 () => {