diff --git a/README.md b/README.md index 3050fcc95..7c7a6f243 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ One-Click to get well-designed cross-platform ChatGPT web UI. - 预制角色功能(面具),方便地创建、分享和调试你的个性化对话 - 海量的内置 prompt 列表,来自[中文](https://github.com/PlexPt/awesome-chatgpt-prompts-zh)和[英文](https://github.com/f/awesome-chatgpt-prompts) - 自动压缩上下文聊天记录,在节省 Token 的同时支持超长对话 -- 多国语言支持:English, 简体中文, 繁体中文, 日本語, Español, Italiano, Türkçe, Deutsch, Tiếng Việt, Русский, Čeština +- 多国语言支持:English, 简体中文, 繁体中文, 日本語, Español, Italiano, Türkçe, Deutsch, Tiếng Việt, Русский, Čeština, 한국어, Indonesia - 拥有自己的域名?好上加好,绑定后即可在任何地方**无障碍**快速访问 ## 开发计划 @@ -346,6 +346,9 @@ If you want to add a new translation, read this [document](./docs/translation.md [@piksonGit](https://github.com/piksonGit) [@ouyangzhiping](https://github.com/ouyangzhiping) [@wenjiavv](https://github.com/wenjiavv) +[@LeXwDeX](https://github.com/LeXwDeX) +[@Licoy](https://github.com/Licoy) +[@shangmin2009](https://github.com/shangmin2009) ### Contributor diff --git a/README_CN.md b/README_CN.md index 0ef508f61..d73479658 100644 --- a/README_CN.md +++ b/README_CN.md @@ -139,7 +139,7 @@ Azure Api 版本,你可以在这里找到:[Azure 文档](https://learn.micro OPENAI_API_KEY= # 中国大陆用户,可以使用本项目自带的代理进行开发,你也可以自由选择其他代理地址 -BASE_URL=https://a.nextweb.fun/api/proxy +BASE_URL=https://b.nextweb.fun/api/proxy ``` ### 本地开发 diff --git a/app/api/common.ts b/app/api/common.ts index dd1cc0bb8..6b0d619df 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -30,7 +30,10 @@ export async function requestOpenai(req: NextRequest) { console.log("[Proxy] ", path); console.log("[Base Url]", baseUrl); - console.log("[Org ID]", serverConfig.openaiOrgId); + // this fix [Org ID] undefined in server side if not using custom point + if (serverConfig.openaiOrgId !== undefined) { + console.log("[Org ID]", serverConfig.openaiOrgId); + } const timeoutId = setTimeout( () => { diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 4d9de7259..39abdd97b 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -449,8 +449,7 @@ export function ChatActions(props: { ); showToast(nextModel); } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, [currentModel, models]); + }, [chatStore, currentModel, models]); return (
diff --git a/app/components/settings.tsx b/app/components/settings.tsx index 1edb3c6ba..f53024d6c 100644 --- a/app/components/settings.tsx +++ b/app/components/settings.tsx @@ -635,6 +635,11 @@ export function Settings() { navigate(Path.Home); } }; + if (clientConfig?.isApp) { // Force to set custom endpoint to true if it's app + accessStore.update((state) => { + state.useCustomConfig = true; + }); + } document.addEventListener("keydown", keydownEvent); return () => { document.removeEventListener("keydown", keydownEvent); @@ -909,21 +914,26 @@ export function Settings() { {!accessStore.hideUserApiKey && ( <> - - - accessStore.update( - (access) => - (access.useCustomConfig = e.currentTarget.checked), - ) - } - > - + { + // Conditionally render the following ListItem based on clientConfig.isApp + !clientConfig?.isApp && ( // only show if isApp is false + + + accessStore.update( + (access) => + (access.useCustomConfig = e.currentTarget.checked), + ) + } + > + + ) + } {accessStore.useCustomConfig && ( <> { + session.lastSummarizeIndex = lastSummarizeIndex; + session.memoryPrompt = message; // Update the memory prompt for stored it in local storage + }); }, onError(err) { console.error("[Summarize] ", err); diff --git a/app/utils.ts b/app/utils.ts index acc140ac3..ac7e80e7a 100644 --- a/app/utils.ts +++ b/app/utils.ts @@ -3,7 +3,10 @@ import { showToast } from "./components/ui-lib"; import Locale from "./locales"; export function trimTopic(topic: string) { - return topic.replace(/[,。!?”“"、,.!?]*$/, ""); + // Fix an issue where double quotes still show in the Indonesian language + // This will remove the specified punctuation from the end of the string + // and also trim quotes from both the start and end if they exist. + return topic.replace(/^["“”]+|["“”]+$/g, "").replace(/[,。!?”“"、,.!?]*$/, ""); } export async function copyToClipboard(text: string) { diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 182d00792..7f2ffb0f6 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -9,7 +9,7 @@ }, "package": { "productName": "ChatGPT Next Web", - "version": "2.9.12" + "version": "2.9.13" }, "tauri": { "allowlist": {