move const declarations to top of file

This commit is contained in:
uinstinct 2025-05-20 14:47:36 +05:30
parent 769e09d276
commit 589d025fa4

View file

@ -29,6 +29,14 @@ export function useMainEditorWebviewListeners({
inputId: string;
editorFocusedRef: MutableRefObject<boolean | undefined>;
}) {
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 () => {