diff --git a/README.md b/README.md
index e1f42e1a099..25801e6430c 100644
--- a/README.md
+++ b/README.md
@@ -230,8 +230,8 @@ yarn dev
docker pull yidadaa/chatgpt-next-web
docker run -d -p 3000:3000 \
- -e OPENAI_API_KEY="sk-xxxx" \
- -e CODE="your-password" \
+ -e OPENAI_API_KEY=sk-xxxx \
+ -e CODE=your-password \
yidadaa/chatgpt-next-web
```
@@ -239,9 +239,9 @@ You can start service behind a proxy:
```shell
docker run -d -p 3000:3000 \
- -e OPENAI_API_KEY="sk-xxxx" \
- -e CODE="your-password" \
- -e PROXY_URL="http://localhost:7890" \
+ -e OPENAI_API_KEY=sk-xxxx \
+ -e CODE=your-password \
+ -e PROXY_URL=http://localhost:7890 \
yidadaa/chatgpt-next-web
```
diff --git a/README_CN.md b/README_CN.md
index 568cd229a4c..1111540e992 100644
--- a/README_CN.md
+++ b/README_CN.md
@@ -135,8 +135,8 @@ BASE_URL=https://chatgpt1.nextweb.fun/api/proxy
docker pull yidadaa/chatgpt-next-web
docker run -d -p 3000:3000 \
- -e OPENAI_API_KEY="sk-xxxx" \
- -e CODE="页面访问密码" \
+ -e OPENAI_API_KEY=sk-xxxx \
+ -e CODE=页面访问密码 \
yidadaa/chatgpt-next-web
```
@@ -144,10 +144,10 @@ docker run -d -p 3000:3000 \
```shell
docker run -d -p 3000:3000 \
- -e OPENAI_API_KEY="sk-xxxx" \
- -e CODE="页面访问密码" \
+ -e OPENAI_API_KEY=sk-xxxx \
+ -e CODE=页面访问密码 \
--net=host \
- -e PROXY_URL="http://127.0.0.1:7890" \
+ -e PROXY_URL=http://127.0.0.1:7890 \
yidadaa/chatgpt-next-web
```
diff --git a/README_ES.md b/README_ES.md
index 34e9678f9ad..a5787a996d0 100644
--- a/README_ES.md
+++ b/README_ES.md
@@ -130,8 +130,8 @@ Antes de empezar a escribir código, debe crear uno nuevo en la raíz del proyec
docker pull yidadaa/chatgpt-next-web
docker run -d -p 3000:3000 \
- -e OPENAI_API_KEY="sk-xxxx" \
- -e CODE="页面访问密码" \
+ -e OPENAI_API_KEY=sk-xxxx \
+ -e CODE=your-password \
yidadaa/chatgpt-next-web
```
@@ -139,10 +139,10 @@ También puede especificar proxy:
```shell
docker run -d -p 3000:3000 \
- -e OPENAI_API_KEY="sk-xxxx" \
- -e CODE="页面访问密码" \
+ -e OPENAI_API_KEY=sk-xxxx \
+ -e CODE=your-password \
--net=host \
- -e PROXY_URL="http://127.0.0.1:7890" \
+ -e PROXY_URL=http://127.0.0.1:7890 \
yidadaa/chatgpt-next-web
```
diff --git a/README_JA.md b/README_JA.md
index 6018a1b010c..72a0d5373f6 100644
--- a/README_JA.md
+++ b/README_JA.md
@@ -196,8 +196,8 @@ yarn dev
docker pull yidadaa/chatgpt-next-web
docker run -d -p 3000:3000 \
- -e OPENAI_API_KEY="sk-xxxx" \
- -e CODE="your-password" \
+ -e OPENAI_API_KEY=sk-xxxx \
+ -e CODE=your-password \
yidadaa/chatgpt-next-web
```
@@ -205,9 +205,9 @@ docker run -d -p 3000:3000 \
```shell
docker run -d -p 3000:3000 \
- -e OPENAI_API_KEY="sk-xxxx" \
- -e CODE="your-password" \
- -e PROXY_URL="http://localhost:7890" \
+ -e OPENAI_API_KEY=sk-xxxx \
+ -e CODE=your-password \
+ -e PROXY_URL=http://localhost:7890 \
yidadaa/chatgpt-next-web
```
diff --git a/README_KO.md b/README_KO.md
index 86fba5115e5..519dd9d9bb5 100644
--- a/README_KO.md
+++ b/README_KO.md
@@ -135,8 +135,8 @@ BASE_URL=https://chatgpt1.nextweb.fun/api/proxy
docker pull yidadaa/chatgpt-next-web
docker run -d -p 3000:3000 \
- -e OPENAI_API_KEY="sk-xxxx" \
- -e CODE="페이지 접근 비밀번호" \
+ -e OPENAI_API_KEY=sk-xxxx \
+ -e CODE=페이지 접근 비밀번호 \
yidadaa/chatgpt-next-web
```
@@ -144,10 +144,10 @@ docker run -d -p 3000:3000 \
```shell
docker run -d -p 3000:3000 \
- -e OPENAI_API_KEY="sk-xxxx" \
- -e CODE="페이지 접근 비밀번호" \
+ -e OPENAI_API_KEY=sk-xxxx \
+ -e CODE=페이지 접근 비밀번호 \
--net=host \
- -e PROXY_URL="http://127.0.0.1:7890" \
+ -e PROXY_URL=http://127.0.0.1:7890 \
yidadaa/chatgpt-next-web
```
diff --git a/app/components/chat.tsx b/app/components/chat.tsx
index 9a9488dd2cd..dfda4055b76 100644
--- a/app/components/chat.tsx
+++ b/app/components/chat.tsx
@@ -935,7 +935,7 @@ function _Chat() {
const isTouchTopEdge = e.scrollTop <= edgeThreshold;
const isTouchBottomEdge = bottomHeight >= e.scrollHeight - edgeThreshold;
- const isHitBottom = bottomHeight >= e.scrollHeight - 10;
+ const isHitBottom = bottomHeight >= e.scrollHeight - (isMobileScreen ? 0 : 10);
const prevPageMsgIndex = msgRenderIndex - CHAT_PAGE_SIZE;
const nextPageMsgIndex = msgRenderIndex + CHAT_PAGE_SIZE;
diff --git a/app/components/exporter.tsx b/app/components/exporter.tsx
index 604b8823def..2e3cd84aa75 100644
--- a/app/components/exporter.tsx
+++ b/app/components/exporter.tsx
@@ -565,21 +565,32 @@ export function MarkdownPreviewer(props: {
);
}
+// modified by BackTrackZ now it's looks better
+
export function JsonPreviewer(props: {
messages: ChatMessage[];
topic: string;
}) {
- const msgs = props.messages.map((m) => ({
- role: m.role,
- content: m.content,
- }));
- const mdText = "\n" + JSON.stringify(msgs, null, 2) + "\n";
+ const msgs = {
+ messages: [
+ {
+ role: "system",
+ content: "You are an assistant that " + props.topic,
+ },
+ ...props.messages.map((m) => ({
+ role: m.role,
+ content: m.content,
+ })),
+ ],
+ };
+ const mdText = "```json\n" + JSON.stringify(msgs, null, 2) + "\n```";
+ const minifiedJson = JSON.stringify(msgs);
const copy = () => {
- copyToClipboard(JSON.stringify(msgs, null, 2));
+ copyToClipboard(minifiedJson);
};
const download = () => {
- downloadAs(JSON.stringify(msgs, null, 2), `${props.topic}.json`);
+ downloadAs(JSON.stringify(msgs), `${props.topic}.json`);
};
return (
@@ -587,12 +598,12 @@ export function JsonPreviewer(props: {
{mdText}+