From c4ca05865d87533614de03989788887e3d4cafbf Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Tue, 25 Apr 2023 20:12:00 +0800 Subject: [PATCH 1/7] Update README_CN.md --- README_CN.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/README_CN.md b/README_CN.md index 03ec2a101..23dfee85a 100644 --- a/README_CN.md +++ b/README_CN.md @@ -114,14 +114,16 @@ OPENAI_API_KEY= ### 本地开发 -1. 安装 nodejs 和 yarn,具体细节请询问 ChatGPT; -2. 执行 `yarn install && yarn dev` 即可。 +1. 安装 nodejs 18 和 yarn,具体细节请询问 ChatGPT; +2. 执行 `yarn install && yarn dev` 即可。⚠️注意:此命令仅用于本地开发,不要用于部署! +3. 如果你想本地部署,请使用 `yarn install && yarn start` 命令,你可以配合 pm2 来守护进程,防止被杀死,详情询问 ChatGPT。 ## 部署 ### 容器部署 (推荐) +> Docker 版本需要在 20 及其以上,否则会提示找不到镜像。 -> 注意:docker 版本在大多数时间都会落后最新的版本 1 到 2 天,所以部署后会持续出现“存在更新”的提示,属于正常现象。 +> ⚠️注意:docker 版本在大多数时间都会落后最新的版本 1 到 2 天,所以部署后会持续出现“存在更新”的提示,属于正常现象。 ```shell docker pull yidadaa/chatgpt-next-web @@ -143,6 +145,8 @@ docker run -d -p 3000:3000 \ yidadaa/chatgpt-next-web ``` +如果你需要指定其他环境变量,请自行在上述命令中增加 `-e 环境变量=环境变量值` 来指定。 + ### 本地部署 在控制台运行下方命令: @@ -151,6 +155,8 @@ docker run -d -p 3000:3000 \ bash <(curl -s https://raw.githubusercontent.com/Yidadaa/ChatGPT-Next-Web/main/scripts/setup.sh) ``` +⚠️注意:如果你安装过程中遇到了问题,请使用 docker 部署。 + ## 鸣谢 ### 捐赠者 From 2e01a93a4a9195db095d0d208bf9c788cacb8294 Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Tue, 25 Apr 2023 22:54:21 +0800 Subject: [PATCH 2/7] Update issue templates --- .github/ISSUE_TEMPLATE/反馈问题.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/ISSUE_TEMPLATE/反馈问题.md b/.github/ISSUE_TEMPLATE/反馈问题.md index ea56aa6fa..b21442f53 100644 --- a/.github/ISSUE_TEMPLATE/反馈问题.md +++ b/.github/ISSUE_TEMPLATE/反馈问题.md @@ -8,6 +8,9 @@ assignees: '' --- **反馈须知** + +⚠️ 注意:不遵循此模板的任何帖子都会被立即关闭。 + > 请在下方中括号内输入 x 来表示你已经知晓相关内容。 - [ ] 我确认已经在 [常见问题](https://github.com/Yidadaa/ChatGPT-Next-Web/blob/main/docs/faq-cn.md) 中搜索了此次反馈的问题,没有找到解答; - [ ] 我确认已经在 [Issues](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) 列表(包括已经 Close 的)中搜索了此次反馈的问题,没有找到解答。 From fcce9968e9f25885911d2a3593869054714dfd8a Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Wed, 26 Apr 2023 11:30:17 +0800 Subject: [PATCH 3/7] Update README.md --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index a6d1e3d33..32bf6416a 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,8 @@ One-Click to deploy well-designed ChatGPT web UI on Vercel. [Demo](https://chat-gpt-next-web.vercel.app/) / [Issues](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) / [Join Discord](https://discord.gg/zrhvHCr79N) / [Buy Me a Coffee](https://www.buymeacoffee.com/yidadaa) -[演示](https://chat-gpt-next-web.vercel.app/) / [反馈](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) / [QQ 群](https://user-images.githubusercontent.com/16968934/233002565-139daa1a-eb3a-4a12-ac37-6418e7a15d36.png) / [打赏开发者](https://user-images.githubusercontent.com/16968934/227772541-5bcd52d8-61b7-488c-a203-0330d8006e2b.jpg) +[演示](https://chat-gpt-next-web.vercel.app/) / [反馈](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) / [QQ 群](https://user-images.githubusercontent.com/16968934/234462588-e8eff256-f5ca-46ef-8f5f-d7db6d28735a.jpg) / [打赏开发者](https://user-images.githubusercontent.com/16968934/227772541-5bcd52d8-61b7-488c-a203-0330d8006e2b.jpg) + [![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2FYidadaa%2FChatGPT-Next-Web&env=OPENAI_API_KEY&env=CODE&project-name=chatgpt-next-web&repository-name=ChatGPT-Next-Web) @@ -232,6 +233,8 @@ bash <(curl -s https://raw.githubusercontent.com/Yidadaa/ChatGPT-Next-Web/main/s [@yankunsong](https://github.com/yankunsong) [@ypwhs](https://github.com/ypwhs) [@fxxxchao](https://github.com/fxxxchao) +[@hotic](https://github.com/hotic) +[@WingCH](https://github.com/WingCH) ### Contributor From fbacfba92a155cb039f80588ccd8244ef956d742 Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Wed, 26 Apr 2023 11:32:07 +0800 Subject: [PATCH 4/7] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 32bf6416a..073c22a7b 100644 --- a/README.md +++ b/README.md @@ -235,6 +235,8 @@ bash <(curl -s https://raw.githubusercontent.com/Yidadaa/ChatGPT-Next-Web/main/s [@fxxxchao](https://github.com/fxxxchao) [@hotic](https://github.com/hotic) [@WingCH](https://github.com/WingCH) +[@jtung4](https://github.com/jtung4) + ### Contributor From 2deb5cbc9eefb29a3b96a0eed98f6305355157b7 Mon Sep 17 00:00:00 2001 From: Yifei Zhang Date: Wed, 26 Apr 2023 14:43:43 +0800 Subject: [PATCH 5/7] fix: #1094 try to disable zoom on ios safari --- app/styles/globals.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/app/styles/globals.scss b/app/styles/globals.scss index 37c662288..8a7b457a1 100644 --- a/app/styles/globals.scss +++ b/app/styles/globals.scss @@ -98,6 +98,7 @@ body { justify-content: center; align-items: center; user-select: none; + touch-action: pan-x pan-y; font-family: "Noto Sans SC", "SF Pro SC", "SF Pro Text", "SF Pro Icons", "PingFang SC", "Helvetica Neue", "Helvetica", "Arial", sans-serif; From 7ed85177719f035367bbc186ddf7ee3684624647 Mon Sep 17 00:00:00 2001 From: BaiMeow Date: Wed, 26 Apr 2023 21:24:14 +0800 Subject: [PATCH 6/7] fix: innerHTML may leads to script execution --- app/utils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils.ts b/app/utils.ts index dfec8d3e9..1da65c993 100644 --- a/app/utils.ts +++ b/app/utils.ts @@ -129,7 +129,7 @@ export function autoGrowTextArea(dom: HTMLTextAreaElement) { const width = getDomContentWidth(dom); measureDom.style.width = width + "px"; - measureDom.innerHTML = dom.value.trim().length > 0 ? dom.value : "1"; + measureDom.innerText = dom.value.trim().length > 0 ? dom.value : "1"; const lineWrapCount = Math.max(0, dom.value.split("\n").length - 1); const height = parseFloat(window.getComputedStyle(measureDom).height); From 0f9fe92fa3c1fd4894bf45d48ecb5ba0a56e3a80 Mon Sep 17 00:00:00 2001 From: Shi Liang <7258605+shih-liang@users.noreply.github.com> Date: Wed, 26 Apr 2023 21:42:43 +0800 Subject: [PATCH 7/7] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A8=E8=81=8A?= =?UTF-8?q?=E5=A4=A9=E5=BE=88=E7=9F=AD=E6=B2=A1=E6=9C=89=E8=A6=86=E7=9B=96?= =?UTF-8?q?=E6=95=B4=E4=B8=AA=E5=8C=BA=E5=9F=9F=E6=97=B6=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E5=9B=9E=E5=88=B0=E5=BA=95=E9=83=A8=E6=8C=89=E9=92=AE=E7=9A=84?= =?UTF-8?q?bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/components/chat.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/chat.tsx b/app/components/chat.tsx index b80bf5a18..cb163cff0 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -438,7 +438,7 @@ export function Chat() { const [isLoading, setIsLoading] = useState(false); const { submitKey, shouldSubmit } = useSubmitHandler(); const { scrollRef, setAutoScroll, scrollToBottom } = useScrollToBottom(); - const [hitBottom, setHitBottom] = useState(false); + const [hitBottom, setHitBottom] = useState(true); const isMobileScreen = useMobileScreen(); const navigate = useNavigate();