mirror of
				https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
				synced 2025-11-04 00:03:46 +08:00 
			
		
		
		
	Compare commits
	
		
			2 Commits
		
	
	
		
			main
			...
			42344f0f0d
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					42344f0f0d | ||
| 
						 | 
					6888f10e0c | 
@@ -6,7 +6,7 @@ export const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;
 | 
			
		||||
export const UPDATE_URL = `${REPO_URL}#keep-updated`;
 | 
			
		||||
export const RELEASE_URL = `${REPO_URL}/releases`;
 | 
			
		||||
export const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/commits?per_page=1`;
 | 
			
		||||
export const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`;
 | 
			
		||||
export const FETCH_LATEST_RELEASE_URL = `https://api.github.com/repos/${OWNER}/${REPO}/releases/latest`;
 | 
			
		||||
export const RUNTIME_CONFIG_DOM = "danger-runtime-config";
 | 
			
		||||
 | 
			
		||||
export const STABILITY_BASE_URL = "https://api.stability.ai";
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
import {
 | 
			
		||||
  FETCH_COMMIT_URL,
 | 
			
		||||
  FETCH_TAG_URL,
 | 
			
		||||
  FETCH_LATEST_RELEASE_URL,
 | 
			
		||||
  ModelProvider,
 | 
			
		||||
  StoreKey,
 | 
			
		||||
} from "../constant";
 | 
			
		||||
@@ -41,11 +41,11 @@ async function getVersion(type: VersionType) {
 | 
			
		||||
    const remoteId = new Date(remoteCommitTime).getTime().toString();
 | 
			
		||||
    return remoteId;
 | 
			
		||||
  } else if (type === "tag") {
 | 
			
		||||
    const data = (await (await fetch(FETCH_TAG_URL)).json()) as {
 | 
			
		||||
      commit: { sha: string; url: string };
 | 
			
		||||
    const data = (await (await fetch(FETCH_LATEST_RELEASE_URL)).json()) as {
 | 
			
		||||
      tag_name: string;
 | 
			
		||||
      name: string;
 | 
			
		||||
    }[];
 | 
			
		||||
    return data.at(0)?.name;
 | 
			
		||||
    };
 | 
			
		||||
    return data.tag_name;
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user