LlamaFinetuneGGUF commited on
Commit
b5c8d43
·
1 Parent(s): 51347ed
app/lib/hooks/useSettings.tsx CHANGED
@@ -5,7 +5,7 @@ import {
5
  isLocalModelsEnabled,
6
  LOCAL_PROVIDERS,
7
  providersStore,
8
- useLatestBranch,
9
  } from '~/lib/stores/settings';
10
  import { useCallback, useEffect, useState } from 'react';
11
  import Cookies from 'js-cookie';
@@ -22,7 +22,7 @@ export function useSettings() {
22
  const debug = useStore(isDebugMode);
23
  const eventLogs = useStore(isEventLogsEnabled);
24
  const isLocalModel = useStore(isLocalModelsEnabled);
25
- const useLatest = useStore(useLatestBranch);
26
  const [activeProviders, setActiveProviders] = useState<ProviderInfo[]>([]);
27
 
28
  // Function to check if we're on stable version
@@ -90,11 +90,11 @@ export function useSettings() {
90
  // If setting hasn't been set by user, check version
91
  checkIsStableVersion().then(isStable => {
92
  const shouldUseLatest = !isStable;
93
- useLatestBranch.set(shouldUseLatest);
94
  Cookies.set('useLatestBranch', String(shouldUseLatest));
95
  });
96
  } else {
97
- useLatestBranch.set(savedLatestBranch === 'true');
98
  }
99
  }, []);
100
 
@@ -148,7 +148,7 @@ export function useSettings() {
148
  }, []);
149
 
150
  const enableLatestBranch = useCallback((enabled: boolean) => {
151
- useLatestBranch.set(enabled);
152
  logStore.logSystem(`Main branch updates ${enabled ? 'enabled' : 'disabled'}`);
153
  Cookies.set('useLatestBranch', String(enabled));
154
  }, []);
 
5
  isLocalModelsEnabled,
6
  LOCAL_PROVIDERS,
7
  providersStore,
8
+ latestBranch,
9
  } from '~/lib/stores/settings';
10
  import { useCallback, useEffect, useState } from 'react';
11
  import Cookies from 'js-cookie';
 
22
  const debug = useStore(isDebugMode);
23
  const eventLogs = useStore(isEventLogsEnabled);
24
  const isLocalModel = useStore(isLocalModelsEnabled);
25
+ const useLatest = useStore(latestBranch);
26
  const [activeProviders, setActiveProviders] = useState<ProviderInfo[]>([]);
27
 
28
  // Function to check if we're on stable version
 
90
  // If setting hasn't been set by user, check version
91
  checkIsStableVersion().then(isStable => {
92
  const shouldUseLatest = !isStable;
93
+ latestBranch.set(shouldUseLatest);
94
  Cookies.set('useLatestBranch', String(shouldUseLatest));
95
  });
96
  } else {
97
+ latestBranch.set(savedLatestBranch === 'true');
98
  }
99
  }, []);
100
 
 
148
  }, []);
149
 
150
  const enableLatestBranch = useCallback((enabled: boolean) => {
151
+ latestBranch.set(enabled);
152
  logStore.logSystem(`Main branch updates ${enabled ? 'enabled' : 'disabled'}`);
153
  Cookies.set('useLatestBranch', String(enabled));
154
  }, []);
app/lib/stores/settings.ts CHANGED
@@ -47,4 +47,4 @@ export const isEventLogsEnabled = atom(false);
47
 
48
  export const isLocalModelsEnabled = atom(true);
49
 
50
- export const useLatestBranch = atom(false);
 
47
 
48
  export const isLocalModelsEnabled = atom(true);
49
 
50
+ export const latestBranch = atom(false);