LlamaFinetuneGGUF commited on
Commit
51347ed
·
1 Parent(s): c5c3eee
app/components/settings/debug/DebugTab.tsx CHANGED
@@ -32,6 +32,10 @@ interface IProviderConfig {
32
  };
33
  }
34
 
 
 
 
 
35
  const LOCAL_PROVIDERS = ['Ollama', 'LMStudio', 'OpenAILike'];
36
  const versionHash = commit.commit;
37
  const GITHUB_URLS = {
@@ -266,10 +270,10 @@ export default function DebugTab() {
266
 
267
  const localCommitResponse = await fetch(GITHUB_URLS.commitJson(branchToCheck));
268
  if (!localCommitResponse.ok) {
269
- throw new Error('Failed to fetch repository information');
270
  }
271
 
272
- const localCommitData = await localCommitResponse.json();
273
  const remoteCommitHash = localCommitData.commit;
274
  const currentCommitHash = versionHash;
275
 
 
32
  };
33
  }
34
 
35
+ interface CommitData {
36
+ commit: string;
37
+ }
38
+
39
  const LOCAL_PROVIDERS = ['Ollama', 'LMStudio', 'OpenAILike'];
40
  const versionHash = commit.commit;
41
  const GITHUB_URLS = {
 
270
 
271
  const localCommitResponse = await fetch(GITHUB_URLS.commitJson(branchToCheck));
272
  if (!localCommitResponse.ok) {
273
+ throw new Error('Failed to fetch local commit info');
274
  }
275
 
276
+ const localCommitData = await localCommitResponse.json() as CommitData;
277
  const remoteCommitHash = localCommitData.commit;
278
  const currentCommitHash = versionHash;
279
 
app/lib/hooks/useSettings.tsx CHANGED
@@ -13,6 +13,10 @@ import type { IProviderSetting, ProviderInfo } from '~/types/model';
13
  import { logStore } from '~/lib/stores/logs'; // assuming logStore is imported from this location
14
  import commit from '~/commit.json';
15
 
 
 
 
 
16
  export function useSettings() {
17
  const providers = useStore(providersStore);
18
  const debug = useStore(isDebugMode);
@@ -29,7 +33,7 @@ export function useSettings() {
29
  console.warn('Failed to fetch stable commit info');
30
  return false;
31
  }
32
- const stableData = await stableResponse.json();
33
  return commit.commit === stableData.commit;
34
  } catch (error) {
35
  console.warn('Error checking stable version:', error);
 
13
  import { logStore } from '~/lib/stores/logs'; // assuming logStore is imported from this location
14
  import commit from '~/commit.json';
15
 
16
+ interface CommitData {
17
+ commit: string;
18
+ }
19
+
20
  export function useSettings() {
21
  const providers = useStore(providersStore);
22
  const debug = useStore(isDebugMode);
 
33
  console.warn('Failed to fetch stable commit info');
34
  return false;
35
  }
36
+ const stableData = await stableResponse.json() as CommitData;
37
  return commit.commit === stableData.commit;
38
  } catch (error) {
39
  console.warn('Error checking stable version:', error);