fix build bug

This commit is contained in:
AC
2025-06-11 15:43:43 +08:00
parent cd0366392a
commit f72aadc35d
7 changed files with 32 additions and 11 deletions

View File

@@ -69,7 +69,8 @@ export function fetch(url: string, options?: RequestInit): Promise<Response> {
const headers: Record<string, string> = {
Accept: "application/json, text/plain, */*",
"Accept-Language": "en-US,en;q=0.9,zh-CN;q=0.8,zh;q=0.7",
"User-Agent": navigator.userAgent,
"User-Agent":
typeof navigator !== "undefined" ? navigator.userAgent : "NextChat",
};
for (const item of new Headers(_headers || {})) {
headers[item[0]] = item[1];