mirror of
https://github.com/stackblitz/bolt.new
synced 2025-02-06 04:48:04 +00:00
quick fix
This commit is contained in:
parent
c5c3eee267
commit
51347edd28
@ -32,6 +32,10 @@ interface IProviderConfig {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface CommitData {
|
||||||
|
commit: string;
|
||||||
|
}
|
||||||
|
|
||||||
const LOCAL_PROVIDERS = ['Ollama', 'LMStudio', 'OpenAILike'];
|
const LOCAL_PROVIDERS = ['Ollama', 'LMStudio', 'OpenAILike'];
|
||||||
const versionHash = commit.commit;
|
const versionHash = commit.commit;
|
||||||
const GITHUB_URLS = {
|
const GITHUB_URLS = {
|
||||||
@ -266,10 +270,10 @@ export default function DebugTab() {
|
|||||||
|
|
||||||
const localCommitResponse = await fetch(GITHUB_URLS.commitJson(branchToCheck));
|
const localCommitResponse = await fetch(GITHUB_URLS.commitJson(branchToCheck));
|
||||||
if (!localCommitResponse.ok) {
|
if (!localCommitResponse.ok) {
|
||||||
throw new Error('Failed to fetch repository information');
|
throw new Error('Failed to fetch local commit info');
|
||||||
}
|
}
|
||||||
|
|
||||||
const localCommitData = await localCommitResponse.json();
|
const localCommitData = await localCommitResponse.json() as CommitData;
|
||||||
const remoteCommitHash = localCommitData.commit;
|
const remoteCommitHash = localCommitData.commit;
|
||||||
const currentCommitHash = versionHash;
|
const currentCommitHash = versionHash;
|
||||||
|
|
||||||
|
@ -13,6 +13,10 @@ import type { IProviderSetting, ProviderInfo } from '~/types/model';
|
|||||||
import { logStore } from '~/lib/stores/logs'; // assuming logStore is imported from this location
|
import { logStore } from '~/lib/stores/logs'; // assuming logStore is imported from this location
|
||||||
import commit from '~/commit.json';
|
import commit from '~/commit.json';
|
||||||
|
|
||||||
|
interface CommitData {
|
||||||
|
commit: string;
|
||||||
|
}
|
||||||
|
|
||||||
export function useSettings() {
|
export function useSettings() {
|
||||||
const providers = useStore(providersStore);
|
const providers = useStore(providersStore);
|
||||||
const debug = useStore(isDebugMode);
|
const debug = useStore(isDebugMode);
|
||||||
@ -29,7 +33,7 @@ export function useSettings() {
|
|||||||
console.warn('Failed to fetch stable commit info');
|
console.warn('Failed to fetch stable commit info');
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const stableData = await stableResponse.json();
|
const stableData = await stableResponse.json() as CommitData;
|
||||||
return commit.commit === stableData.commit;
|
return commit.commit === stableData.commit;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.warn('Error checking stable version:', error);
|
console.warn('Error checking stable version:', error);
|
||||||
|
Loading…
Reference in New Issue
Block a user