From 544bab0fe29fa9c62d6d8fd5026c97d2efda3d96 Mon Sep 17 00:00:00 2001 From: H0llyW00dzZ Date: Thu, 9 Nov 2023 20:56:45 +0700 Subject: [PATCH 01/21] Refactor Summarize Logic [+] chore(chat.ts): remove unnecessary comment and refactor variable name [+] feat(chat.ts): add stream: false to config object --- app/store/chat.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/store/chat.ts b/app/store/chat.ts index ff7eb51b5..6eb4e934f 100644 --- a/app/store/chat.ts +++ b/app/store/chat.ts @@ -494,6 +494,7 @@ export const useChatStore = createPersistStore( messages: topicMessages, config: { model: getSummarizeModel(session.mask.modelConfig.model), + stream: false, }, onFinish(message) { get().updateCurrentSession( @@ -539,6 +540,10 @@ export const useChatStore = createPersistStore( historyMsgLength > modelConfig.compressMessageLengthThreshold && modelConfig.sendMemory ) { + /** Destruct max_tokens while summarizing + * this param is just shit + **/ + const { max_tokens, ...modelcfg } = modelConfig; api.llm.chat({ messages: toBeSummarizedMsgs.concat( createMessage({ @@ -548,7 +553,7 @@ export const useChatStore = createPersistStore( }), ), config: { - ...modelConfig, + ...modelcfg, stream: true, model: getSummarizeModel(session.mask.modelConfig.model), }, From 39f3afd52c86c175f16c08b5b22cbcd9e05de9b4 Mon Sep 17 00:00:00 2001 From: SurKaa <98200894+surkaa@users.noreply.github.com> Date: Thu, 16 Nov 2023 09:22:56 +0800 Subject: [PATCH 02/21] =?UTF-8?q?Update=20.env.template=20=E6=9B=B4?= =?UTF-8?q?=E6=AD=A3=E5=8D=95=E8=AF=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env.template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.env.template b/.env.template index 3e3290369..ba7224dea 100644 --- a/.env.template +++ b/.env.template @@ -2,7 +2,7 @@ # Your openai api key. (required) OPENAI_API_KEY=sk-xxxx -# Access passsword, separated by comma. (optional) +# Access password, separated by comma. (optional) CODE=your-password # You can start service behind a proxy From fe0f078353c1f6ee621ceca793747fda84cd1b81 Mon Sep 17 00:00:00 2001 From: H0llyW00dzZ Date: Sun, 19 Nov 2023 19:49:52 +0700 Subject: [PATCH 03/21] Feat ChatGPT LLM Api [Console Log] [Text Moderation] [Azure] [+] fix(openai.ts): fix parsing error in ChatGPTApi's message handler [+] feat(openai.ts): add logging for flagged categories in text moderation --- app/client/platforms/openai.ts | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/app/client/platforms/openai.ts b/app/client/platforms/openai.ts index 8ea864692..5ca7d43b5 100644 --- a/app/client/platforms/openai.ts +++ b/app/client/platforms/openai.ts @@ -197,19 +197,21 @@ export class ChatGPTApi implements LLMApi { } const text = msg.data; try { - const json = JSON.parse(text) as { - choices: Array<{ - delta: { - content: string; - }; - }>; - }; - const delta = json.choices[0]?.delta?.content; + const json = JSON.parse(text); + const choices = json.choices as Array<{ delta: { content: string } }>; + const delta = choices[0]?.delta?.content; + const textmoderation = json?.prompt_filter_results; + if (delta) { remainText += delta; } + + if (textmoderation && textmoderation.length > 0 && ServiceProvider.Azure) { + const contentFilterResults = textmoderation[0]?.content_filter_results; + console.log(`[${ServiceProvider.Azure}] [Text Moderation] flagged categories result:`, contentFilterResults); + } } catch (e) { - console.error("[Request] parse error", text); + console.error("[Request] parse error", text, msg); } }, onclose() { From 10ea9bf1e39d982fce208da2925200ec88371409 Mon Sep 17 00:00:00 2001 From: frankylli Date: Wed, 29 Nov 2023 16:25:15 +0800 Subject: [PATCH 04/21] fix: MessageSelectorWarning --- app/components/message-selector.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/message-selector.tsx b/app/components/message-selector.tsx index c20153401..4f46ebb81 100644 --- a/app/components/message-selector.tsx +++ b/app/components/message-selector.tsx @@ -224,7 +224,7 @@ export function MessageSelector(props: {
- +
); From 36e9c6ac4dc7d7279bfd9e4c79b10185b1ceb14d Mon Sep 17 00:00:00 2001 From: H0llyW00dzZ Date: Fri, 1 Dec 2023 19:48:10 +0700 Subject: [PATCH 05/21] Refactor Api Common [Server Side] [Console Log] - [+] refactor(common.ts): remove unnecessary console.log for [Org ID] in requestOpenai function - [+] refactor(common.ts): conditionally delete OpenAI-Organization header from response if [Org ID] is not set up in ENV --- app/api/common.ts | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/app/api/common.ts b/app/api/common.ts index 6b0d619df..da5163f4e 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -30,10 +30,6 @@ export async function requestOpenai(req: NextRequest) { console.log("[Proxy] ", path); console.log("[Base Url]", baseUrl); - // 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( () => { @@ -103,12 +99,29 @@ export async function requestOpenai(req: NextRequest) { try { const res = await fetch(fetchUrl, fetchOptions); + // Extract the OpenAI-Organization header from the response + const openaiOrganizationHeader = res.headers.get("OpenAI-Organization"); + + // Check if serverConfig.openaiOrgId is defined + if (serverConfig.openaiOrgId !== undefined) { + // If openaiOrganizationHeader is present, log it; otherwise, log that the header is not present + console.log("[Org ID]", openaiOrganizationHeader); + } else { + console.log("[Org ID] is not set up."); + } + // to prevent browser prompt for credentials const newHeaders = new Headers(res.headers); newHeaders.delete("www-authenticate"); // to disable nginx buffering newHeaders.set("X-Accel-Buffering", "no"); + // Conditionally delete the OpenAI-Organization header from the response if [Org ID] is undefined (not setup in ENV) + // Also This one is to prevent the header from being sent to the client + if (!serverConfig.openaiOrgId) { + newHeaders.delete("OpenAI-Organization"); + } + return new Response(res.body, { status: res.status, statusText: res.statusText, From 8dc868207855da0de077aca739a2d5b186127326 Mon Sep 17 00:00:00 2001 From: H0llyW00dzZ Date: Mon, 4 Dec 2023 13:32:11 +0700 Subject: [PATCH 06/21] Fix Api Common [Server Side] - [+] fix(common.ts): improve handling of OpenAI-Organization header - Check if serverConfig.openaiOrgId is defined and not an empty string - Log the value of openaiOrganizationHeader if present, otherwise log that the header is not present - Conditionally delete the OpenAI-Organization header from the response if [Org ID] is undefined or empty (not setup in ENV) --- app/api/common.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/api/common.ts b/app/api/common.ts index da5163f4e..48ddfb5f0 100644 --- a/app/api/common.ts +++ b/app/api/common.ts @@ -102,8 +102,8 @@ export async function requestOpenai(req: NextRequest) { // Extract the OpenAI-Organization header from the response const openaiOrganizationHeader = res.headers.get("OpenAI-Organization"); - // Check if serverConfig.openaiOrgId is defined - if (serverConfig.openaiOrgId !== undefined) { + // Check if serverConfig.openaiOrgId is defined and not an empty string + if (serverConfig.openaiOrgId && serverConfig.openaiOrgId.trim() !== "") { // If openaiOrganizationHeader is present, log it; otherwise, log that the header is not present console.log("[Org ID]", openaiOrganizationHeader); } else { @@ -116,9 +116,9 @@ export async function requestOpenai(req: NextRequest) { // to disable nginx buffering newHeaders.set("X-Accel-Buffering", "no"); - // Conditionally delete the OpenAI-Organization header from the response if [Org ID] is undefined (not setup in ENV) - // Also This one is to prevent the header from being sent to the client - if (!serverConfig.openaiOrgId) { + // Conditionally delete the OpenAI-Organization header from the response if [Org ID] is undefined or empty (not setup in ENV) + // Also, this is to prevent the header from being sent to the client + if (!serverConfig.openaiOrgId || serverConfig.openaiOrgId.trim() === "") { newHeaders.delete("OpenAI-Organization"); } From 1442337e3cd9176c593a7e0b76db0b74beb2394c Mon Sep 17 00:00:00 2001 From: reece00 <37351410+reece00@users.noreply.github.com> Date: Tue, 12 Dec 2023 02:22:22 +0800 Subject: [PATCH 07/21] The language filtering option of the mask is stored --- app/components/mask.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/app/components/mask.tsx b/app/components/mask.tsx index 3f616c3ac..479b226ed 100644 --- a/app/components/mask.tsx +++ b/app/components/mask.tsx @@ -387,7 +387,16 @@ export function MaskPage() { const maskStore = useMaskStore(); const chatStore = useChatStore(); - const [filterLang, setFilterLang] = useState(); + const [filterLang, setFilterLang] = useState( + localStorage.getItem("Mask-language") as Lang | undefined, + ); + useEffect(() => { + if (filterLang) { + localStorage.setItem("Mask-language", filterLang); + } else { + localStorage.removeItem("Mask-language"); + } + }, [filterLang]); const allMasks = maskStore .getAll() From 943a2707d2976bfab8ecd2258bc629396de18775 Mon Sep 17 00:00:00 2001 From: Eric Huang Date: Fri, 15 Dec 2023 09:37:37 +0800 Subject: [PATCH 08/21] fix(chat-item): selected chat-item showing border in other pages --- app/components/chat-list.tsx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/components/chat-list.tsx b/app/components/chat-list.tsx index 33967717d..7ef6e7b83 100644 --- a/app/components/chat-list.tsx +++ b/app/components/chat-list.tsx @@ -12,7 +12,7 @@ import { import { useChatStore } from "../store"; import Locale from "../locales"; -import { Link, useNavigate } from "react-router-dom"; +import { Link, useLocation, useNavigate } from "react-router-dom"; import { Path } from "../constant"; import { MaskAvatar } from "./mask"; import { Mask } from "../store/mask"; @@ -40,12 +40,16 @@ export function ChatItem(props: { }); } }, [props.selected]); + + const { pathname: currentPath } = useLocation(); return ( {(provided) => (
{ From f05bf0a6f6162c588672875eef9453f2d5e265db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jan 2024 10:20:50 +0000 Subject: [PATCH 09/21] chore(deps-dev): bump eslint-plugin-prettier from 4.2.1 to 5.1.3 Bumps [eslint-plugin-prettier](https://github.com/prettier/eslint-plugin-prettier) from 4.2.1 to 5.1.3. - [Release notes](https://github.com/prettier/eslint-plugin-prettier/releases) - [Changelog](https://github.com/prettier/eslint-plugin-prettier/blob/master/CHANGELOG.md) - [Commits](https://github.com/prettier/eslint-plugin-prettier/compare/v4.2.1...v5.1.3) --- updated-dependencies: - dependency-name: eslint-plugin-prettier dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 87 +++++++++++++--------------------------------------- 2 files changed, 22 insertions(+), 67 deletions(-) diff --git a/package.json b/package.json index a014c7bfe..dd54168c7 100644 --- a/package.json +++ b/package.json @@ -53,7 +53,7 @@ "eslint": "^8.49.0", "eslint-config-next": "13.4.19", "eslint-config-prettier": "^8.8.0", - "eslint-plugin-prettier": "^4.2.1", + "eslint-plugin-prettier": "^5.1.3", "husky": "^8.0.0", "lint-staged": "^13.2.2", "prettier": "^3.0.2", diff --git a/yarn.lock b/yarn.lock index bf07c27ee..4845c8fa0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1296,17 +1296,10 @@ "@nodelib/fs.scandir" "2.1.5" fastq "^1.6.0" -"@pkgr/utils@^2.3.1": - version "2.3.1" - resolved "https://registry.yarnpkg.com/@pkgr/utils/-/utils-2.3.1.tgz#0a9b06ffddee364d6642b3cd562ca76f55b34a03" - integrity sha512-wfzX8kc1PMyUILA+1Z/EqoE4UCXGy0iRGMhPwdfae1+f0OXlLqCk+By+aMzgJBzR9AzS4CDizioG6Ss1gvAFJw== - dependencies: - cross-spawn "^7.0.3" - is-glob "^4.0.3" - open "^8.4.0" - picocolors "^1.0.0" - tiny-glob "^0.2.9" - tslib "^2.4.0" +"@pkgr/core@^0.1.0": + version "0.1.0" + resolved "https://registry.yarnpkg.com/@pkgr/core/-/core-0.1.0.tgz#7d8dacb7fdef0e4387caf7396cbd77f179867d06" + integrity sha512-Zwq5OCzuwJC2jwqmpEQt7Ds1DTi6BWSwoGkbb1n9pO3hzb35BoJELx7c0T23iDkBGkh2e7tvOtjF3tr3OaQHDQ== "@remix-run/router@1.8.0": version "1.8.0" @@ -2745,11 +2738,6 @@ deepmerge@^4.2.2: resolved "https://registry.yarnpkg.com/deepmerge/-/deepmerge-4.3.1.tgz#44b5f2147cd3b00d4b56137685966f26fd25dd4a" integrity sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A== -define-lazy-prop@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/define-lazy-prop/-/define-lazy-prop-2.0.0.tgz#3f7ae421129bcaaac9bc74905c98a0009ec9ee7f" - integrity sha512-Ds09qNh8yw3khSjiJjiUInaGX9xlqZDY7JVryGxdxV7NPeuqQfplOpQ66yJFZut3jLa5zOwkXw1g9EI2uKh4Og== - define-properties@^1.1.3, define-properties@^1.1.4: version "1.2.0" resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.0.tgz#52988570670c9eacedd8064f4a990f2405849bd5" @@ -3096,12 +3084,13 @@ eslint-plugin-jsx-a11y@^6.5.1: object.fromentries "^2.0.6" semver "^6.3.0" -eslint-plugin-prettier@^4.2.1: - version "4.2.1" - resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-4.2.1.tgz#651cbb88b1dab98bfd42f017a12fa6b2d993f94b" - integrity sha512-f/0rXLXUt0oFYs8ra4w49wYZBG5GKZpAYsJSm6rnYL5uVDjd+zowwMwVZHnAjf4edNrKpCDYfXDgmRE/Ak7QyQ== +eslint-plugin-prettier@^5.1.3: + version "5.1.3" + resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz#17cfade9e732cef32b5f5be53bd4e07afd8e67e1" + integrity sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw== dependencies: prettier-linter-helpers "^1.0.0" + synckit "^0.8.6" "eslint-plugin-react-hooks@^4.5.0 || 5.0.0-canary-7118f5dd7-20230705": version "4.6.0" @@ -3492,11 +3481,6 @@ globalthis@^1.0.3: dependencies: define-properties "^1.1.3" -globalyzer@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/globalyzer/-/globalyzer-0.1.0.tgz#cb76da79555669a1519d5a8edf093afaa0bf1465" - integrity sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q== - globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" @@ -3520,11 +3504,6 @@ globby@^13.1.3: merge2 "^1.4.1" slash "^4.0.0" -globrex@^0.1.2: - version "0.1.2" - resolved "https://registry.yarnpkg.com/globrex/-/globrex-0.1.2.tgz#dd5d9ec826232730cd6793a5e33a9302985e6098" - integrity sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg== - gopd@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" @@ -3843,11 +3822,6 @@ is-date-object@^1.0.1, is-date-object@^1.0.5: dependencies: has-tostringtag "^1.0.0" -is-docker@^2.0.0, is-docker@^2.1.1: - version "2.2.1" - resolved "https://registry.yarnpkg.com/is-docker/-/is-docker-2.2.1.tgz#33eeabe23cfe86f14bde4408a02c0cfb853acdaa" - integrity sha512-F+i2BKsFrH66iaUFc0woD8sLy8getkwTwtOBjvs56Cx4CgJDeKQeqfz8wAYiSb8JOprWhHH5p77PbmYCvvUuXQ== - is-extglob@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2" @@ -3972,13 +3946,6 @@ is-weakset@^2.0.1: call-bind "^1.0.2" get-intrinsic "^1.1.1" -is-wsl@^2.2.0: - version "2.2.0" - resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" - integrity sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww== - dependencies: - is-docker "^2.0.0" - isarray@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" @@ -4953,15 +4920,6 @@ onetime@^6.0.0: dependencies: mimic-fn "^4.0.0" -open@^8.4.0: - version "8.4.2" - resolved "https://registry.yarnpkg.com/open/-/open-8.4.2.tgz#5b5ffe2a8f793dcd2aad73e550cb87b59cb084f9" - integrity sha512-7x81NCL719oNbsq/3mh+hVrAWmFuEYUqrq/Iw3kUzH8ReypT9QQ0BLoJS7/G9k6N81XjW4qHWtjWwe/9eLy1EQ== - dependencies: - define-lazy-prop "^2.0.0" - is-docker "^2.1.1" - is-wsl "^2.2.0" - optionator@^0.9.3: version "0.9.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" @@ -5741,13 +5699,13 @@ svgo@^2.8.0: picocolors "^1.0.0" stable "^0.1.8" -synckit@^0.8.5: - version "0.8.5" - resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.5.tgz#b7f4358f9bb559437f9f167eb6bc46b3c9818fa3" - integrity sha512-L1dapNV6vu2s/4Sputv8xGsCdAVlb5nRDMFU/E27D44l5U6cw1g0dGd45uLc+OXjNMmF4ntiMdCimzcjFKQI8Q== +synckit@^0.8.5, synckit@^0.8.6: + version "0.8.8" + resolved "https://registry.yarnpkg.com/synckit/-/synckit-0.8.8.tgz#fe7fe446518e3d3d49f5e429f443cf08b6edfcd7" + integrity sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ== dependencies: - "@pkgr/utils" "^2.3.1" - tslib "^2.5.0" + "@pkgr/core" "^0.1.0" + tslib "^2.6.2" tapable@^2.1.1, tapable@^2.2.0: version "2.2.1" @@ -5785,14 +5743,6 @@ through@^2.3.8: resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5" integrity sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg== -tiny-glob@^0.2.9: - version "0.2.9" - resolved "https://registry.yarnpkg.com/tiny-glob/-/tiny-glob-0.2.9.tgz#2212d441ac17928033b110f8b3640683129d31e2" - integrity sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg== - dependencies: - globalyzer "0.1.0" - globrex "^0.1.2" - tiny-invariant@^1.0.6: version "1.3.1" resolved "https://registry.npmmirror.com/tiny-invariant/-/tiny-invariant-1.3.1.tgz#8560808c916ef02ecfd55e66090df23a4b7aa642" @@ -5840,11 +5790,16 @@ tsconfig-paths@^3.14.1: minimist "^1.2.6" strip-bom "^3.0.0" -tslib@^2.1.0, tslib@^2.4.0, tslib@^2.5.0: +tslib@^2.1.0, tslib@^2.4.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" integrity sha512-336iVw3rtn2BUK7ORdIAHTyxHGRIHVReokCR3XjbckJMK7ms8FysBfhLR8IXnAgy7T0PTPNBWKiH514FOW/WSg== +tslib@^2.6.2: + version "2.6.2" + resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" + integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== + type-check@^0.4.0, type-check@~0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/type-check/-/type-check-0.4.0.tgz#07b8203bfa7056c0657050e3ccd2c37730bab8f1" From 86f42d56f28b725006e60dbf2ae875917feb3a3f Mon Sep 17 00:00:00 2001 From: Dup4 Date: Thu, 18 Jan 2024 09:11:13 +0800 Subject: [PATCH 10/21] fix: webdav check httpcode list Signed-off-by: Dup4 --- app/utils/cloud/webdav.ts | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/utils/cloud/webdav.ts b/app/utils/cloud/webdav.ts index 3a1553c10..51159ca1a 100644 --- a/app/utils/cloud/webdav.ts +++ b/app/utils/cloud/webdav.ts @@ -20,8 +20,15 @@ export function createWebDavClient(store: SyncStore) { headers: this.headers(), proxyUrl, }); - console.log("[WebDav] check", res.status, res.statusText); - return [201, 200, 404, 301, 302, 307, 308].includes(res.status); + const success = [201, 200, 404, 405, 301, 302, 307, 308].includes( + res.status, + ); + console.log( + `[WebDav] check ${success ? "success" : "failed"}, ${res.status} ${ + res.statusText + }`, + ); + return success; } catch (e) { console.error("[WebDav] failed to check", e); } From bf1b5c39517bdc8b6f8b3eae7a657acf6c7a30dd Mon Sep 17 00:00:00 2001 From: H0llyW00dzZ Date: Wed, 21 Feb 2024 08:46:21 +0700 Subject: [PATCH 11/21] Update Docker Ignore - [+] chore(dockerignore): update .dockerignore file with more comprehensive ignore rules --- .dockerignore | 95 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 92 insertions(+), 3 deletions(-) diff --git a/.dockerignore b/.dockerignore index 60da41dd8..a88c7d616 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,8 +1,97 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* + +# Runtime data +pids +*.pid +*.seed +*.pid.lock + +# Directory for instrumented libs generated by jscoverage/JSCover +lib-cov + +# Coverage directory used by tools like istanbul +coverage +*.lcov + +# nyc test coverage +.nyc_output + +# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files) +.grunt + +# Node.js dependencies +/node_modules +/jspm_packages + +# TypeScript v1 declaration files +typings + +# Optional npm cache directory +.npm + +# Optional eslint cache +.eslintcache + +# Optional REPL history +.node_repl_history + +# Output of 'npm pack' +*.tgz + +# Yarn Integrity file +.yarn-integrity + +# dotenv environment variable files +.env +.env.test + # local env files .env*.local -# docker-compose env files -.env +# Next.js build output +.next +out +# Nuxt.js build output +.nuxt +dist + +# Gatsby files +.cache/ +public + +# Vuepress build output +.vuepress/dist + +# Serverless directories +.serverless/ + +# FuseBox cache +.fusebox/ + +# DynamoDB Local files +.dynamodb/ + +# Temporary folders +tmp +temp + +# IDE and editor directories +.idea +.vscode +*.swp +*.swo +*~ + +# OS generated files +.DS_Store +Thumbs.db + +# secret key *.key -*.key.pub \ No newline at end of file +*.key.pub From 524c9beee4fa02323e4dde295d64c2d224fe3186 Mon Sep 17 00:00:00 2001 From: "l.tingting" Date: Sat, 2 Mar 2024 11:08:34 +0800 Subject: [PATCH 12/21] support \(...\) and \[...\] style math formula --- app/components/markdown.tsx | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/app/components/markdown.tsx b/app/components/markdown.tsx index f3a916cc5..7c70fe1a5 100644 --- a/app/components/markdown.tsx +++ b/app/components/markdown.tsx @@ -116,9 +116,27 @@ function escapeDollarNumber(text: string) { return escapedText; } +function escapeBrackets(text: string) { + const pattern = + /(```[\s\S]*?```|`.*?`)|\\\[([\s\S]*?[^\\])\\\]|\\\((.*?)\\\)/g; + return text.replace( + pattern, + (match, codeBlock, squareBracket, roundBracket) => { + if (codeBlock) { + return codeBlock; + } else if (squareBracket) { + return `$$${squareBracket}$$`; + } else if (roundBracket) { + return `$${roundBracket}$`; + } + return match; + }, + ); +} + function _MarkDownContent(props: { content: string }) { const escapedContent = useMemo( - () => escapeDollarNumber(props.content), + () => escapeBrackets(escapeDollarNumber(props.content)), [props.content], ); From ed8099bf1ebc0b29632d43bc19527900eb13c5fb Mon Sep 17 00:00:00 2001 From: "l.tingting" Date: Sat, 2 Mar 2024 15:26:19 +0800 Subject: [PATCH 13/21] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3ac537abc..1c2b707f8 100644 --- a/README.md +++ b/README.md @@ -216,7 +216,7 @@ If you do not want users to use GPT-4, set this value to 1. > Default: Empty -If you do want users to query balance, set this value to 1, or you should set it to 0. +If you do want users to query balance, set this value to 1. ### `DISABLE_FAST_LINK` (optional) From c0c54e57098b41210b098aec7f4d3561fd6f8c62 Mon Sep 17 00:00:00 2001 From: H0llyW00dzZ Date: Wed, 20 Mar 2024 01:37:38 +0700 Subject: [PATCH 14/21] Fix Webdav Syncing Issues - [+] feat(route.ts): add endpoint validation and improve error handling - [+] refactor(route.ts): use targetPath for request validation and error messages - [+] fix(route.ts): correct targetUrl formation --- app/api/webdav/[...path]/route.ts | 37 ++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/app/api/webdav/[...path]/route.ts b/app/api/webdav/[...path]/route.ts index c60ca18bb..81ede0fd8 100644 --- a/app/api/webdav/[...path]/route.ts +++ b/app/api/webdav/[...path]/route.ts @@ -12,17 +12,28 @@ async function handle( const requestUrl = new URL(req.url); let endpoint = requestUrl.searchParams.get("endpoint"); - if (!endpoint?.endsWith("/")) { - endpoint += "/"; + + // Validate the endpoint to prevent potential SSRF attacks + if (!endpoint || !endpoint.startsWith("/")) { + return NextResponse.json( + { + error: true, + msg: "Invalid endpoint", + }, + { + status: 400, + }, + ); } const endpointPath = params.path.join("/"); + const targetPath = `${endpoint}/${endpointPath}`; // only allow MKCOL, GET, PUT if (req.method !== "MKCOL" && req.method !== "GET" && req.method !== "PUT") { return NextResponse.json( { error: true, - msg: "you are not allowed to request " + params.path.join("/"), + msg: "you are not allowed to request " + targetPath, }, { status: 403, @@ -32,13 +43,13 @@ async function handle( // for MKCOL request, only allow request ${folder} if ( - req.method == "MKCOL" && - !new URL(endpointPath).pathname.endsWith(folder) + req.method === "MKCOL" && + !targetPath.endsWith(folder) ) { return NextResponse.json( { error: true, - msg: "you are not allowed to request " + params.path.join("/"), + msg: "you are not allowed to request " + targetPath, }, { status: 403, @@ -48,13 +59,13 @@ async function handle( // for GET request, only allow request ending with fileName if ( - req.method == "GET" && - !new URL(endpointPath).pathname.endsWith(fileName) + req.method === "GET" && + !targetPath.endsWith(fileName) ) { return NextResponse.json( { error: true, - msg: "you are not allowed to request " + params.path.join("/"), + msg: "you are not allowed to request " + targetPath, }, { status: 403, @@ -64,13 +75,13 @@ async function handle( // for PUT request, only allow request ending with fileName if ( - req.method == "PUT" && - !new URL(endpointPath).pathname.endsWith(fileName) + req.method === "PUT" && + !targetPath.endsWith(fileName) ) { return NextResponse.json( { error: true, - msg: "you are not allowed to request " + params.path.join("/"), + msg: "you are not allowed to request " + targetPath, }, { status: 403, @@ -78,7 +89,7 @@ async function handle( ); } - const targetUrl = `${endpoint + endpointPath}`; + const targetUrl = `${endpoint}/${endpointPath}`; const method = req.method; const shouldNotHaveBody = ["get", "head"].includes( From 29e03b88c75355341859bf0b3e3c6c34699a34a9 Mon Sep 17 00:00:00 2001 From: kidv Date: Sun, 24 Mar 2024 04:07:25 +0800 Subject: [PATCH 15/21] Fix: Handle empty server response in API call --- app/client/platforms/openai.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/client/platforms/openai.ts b/app/client/platforms/openai.ts index 629158843..78e628ad7 100644 --- a/app/client/platforms/openai.ts +++ b/app/client/platforms/openai.ts @@ -151,6 +151,9 @@ export class ChatGPTApi implements LLMApi { if (finished || controller.signal.aborted) { responseText += remainText; console.log("[Response Animation] finished"); + if (responseText?.length === 0) { + options.onError?.(new Error("empty response from server")); + } return; } From e8d76a513dbe5debbe747677154c0f6141380421 Mon Sep 17 00:00:00 2001 From: fred-bf <157469842+fred-bf@users.noreply.github.com> Date: Sun, 24 Mar 2024 14:15:04 +0800 Subject: [PATCH 16/21] patch: disable webdav redirect --- app/api/webdav/[...path]/route.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/app/api/webdav/[...path]/route.ts b/app/api/webdav/[...path]/route.ts index 81ede0fd8..56c2388ae 100644 --- a/app/api/webdav/[...path]/route.ts +++ b/app/api/webdav/[...path]/route.ts @@ -101,6 +101,7 @@ async function handle( authorization: req.headers.get("authorization") ?? "", }, body: shouldNotHaveBody ? null : req.body, + redirect: 'manual', method, // @ts-ignore duplex: "half", From 8e554a87b05d9eaf5695cab44ed19c7d615df4fb Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:46:24 +0000 Subject: [PATCH 17/21] chore(deps): bump emoji-picker-react from 4.5.15 to 4.9.2 Bumps [emoji-picker-react](https://github.com/ealush/emoji-picker-react) from 4.5.15 to 4.9.2. - [Release notes](https://github.com/ealush/emoji-picker-react/releases) - [Commits](https://github.com/ealush/emoji-picker-react/commits) --- updated-dependencies: - dependency-name: emoji-picker-react dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 15 +++++++++++---- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c92e0a084..1b79335fb 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@svgr/webpack": "^6.5.1", "@vercel/analytics": "^0.1.11", "@vercel/speed-insights": "^1.0.2", - "emoji-picker-react": "^4.5.15", + "emoji-picker-react": "^4.9.2", "fuse.js": "^7.0.0", "html-to-image": "^1.11.11", "mermaid": "^10.6.1", diff --git a/yarn.lock b/yarn.lock index db6da708b..f9f5a5aea 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2858,10 +2858,12 @@ elkjs@^0.8.2: resolved "https://registry.npmmirror.com/elkjs/-/elkjs-0.8.2.tgz#c37763c5a3e24e042e318455e0147c912a7c248e" integrity sha512-L6uRgvZTH+4OF5NE/MBbzQx/WYpru1xCBE9respNj6qznEewGUIfhzmm7horWWxbNO2M0WckQypGctR8lH79xQ== -emoji-picker-react@^4.5.15: - version "4.5.15" - resolved "https://registry.yarnpkg.com/emoji-picker-react/-/emoji-picker-react-4.5.15.tgz#e12797c50584cb8af8aee7eb6c7c8fd953e41f7e" - integrity sha512-BTqo+pNUE8kqX8BKFTbD4fhlxcA69qfie5En4PerReLaaPfXVyRlDJ1uf85nKj2u5esUQ999iUf8YyqcPsM2Qw== +emoji-picker-react@^4.9.2: + version "4.9.2" + resolved "https://registry.yarnpkg.com/emoji-picker-react/-/emoji-picker-react-4.9.2.tgz#5118c5e1028ce4a96c94eb7c9bef09d30b08742c" + integrity sha512-pdvLKpto0DMrjE+/8V9QeYjrMcOkJmqBn3GyCSG2zanY32rN2cnWzBUmzArvapAjzBvgf7hNmJP8xmsdu0cmJA== + dependencies: + flairup "0.0.38" emoji-regex@^8.0.0: version "8.0.0" @@ -3338,6 +3340,11 @@ find-up@^5.0.0: locate-path "^6.0.0" path-exists "^4.0.0" +flairup@0.0.38: + version "0.0.38" + resolved "https://registry.yarnpkg.com/flairup/-/flairup-0.0.38.tgz#62216990a8317a1b07d1d816033624c5b2130f31" + integrity sha512-W9QA5TM7eYNlGoBYwfVn/o6v4yWBCxfq4+EJ5w774oFeyWvVWnYq6Dgt4CJltjG9y/lPwbOqz3jSSr8K66ToGg== + flat-cache@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/flat-cache/-/flat-cache-3.0.4.tgz#61b0338302b2fe9f957dcc32fc2a87f1c3048b11" From 6dd7a6a171cc97b1cb040bbff3891ff602bd1d98 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 25 Mar 2024 10:47:55 +0000 Subject: [PATCH 18/21] chore(deps-dev): bump @types/node from 20.9.0 to 20.11.30 Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 20.9.0 to 20.11.30. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c92e0a084..c0c2145af 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ }, "devDependencies": { "@tauri-apps/cli": "1.5.7", - "@types/node": "^20.9.0", + "@types/node": "^20.11.30", "@types/react": "^18.2.14", "@types/react-dom": "^18.2.7", "@types/react-katex": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index db6da708b..98cabc070 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1601,10 +1601,10 @@ resolved "https://registry.yarnpkg.com/@types/ms/-/ms-0.7.31.tgz#31b7ca6407128a3d2bbc27fe2d21b345397f6197" integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA== -"@types/node@*", "@types/node@^20.9.0": - version "20.9.0" - resolved "https://registry.yarnpkg.com/@types/node/-/node-20.9.0.tgz#bfcdc230583aeb891cf51e73cfdaacdd8deae298" - integrity sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw== +"@types/node@*", "@types/node@^20.11.30": + version "20.11.30" + resolved "https://registry.yarnpkg.com/@types/node/-/node-20.11.30.tgz#9c33467fc23167a347e73834f788f4b9f399d66f" + integrity sha512-dHM6ZxwlmuZaRmUPfv1p+KrdD1Dci04FbdEm/9wEMouFqxYoFl5aMkt0VMAUtYRQDyYvD41WJLukhq/ha3YuTw== dependencies: undici-types "~5.26.4" From dcad4007583cdf079edef925ced76e61138f7854 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 05:26:51 +0000 Subject: [PATCH 19/21] chore(deps-dev): bump @types/react from 18.2.14 to 18.2.70 Bumps [@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react) from 18.2.14 to 18.2.70. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react) --- updated-dependencies: - dependency-name: "@types/react" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index c0c2145af..1debc2c50 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "devDependencies": { "@tauri-apps/cli": "1.5.7", "@types/node": "^20.11.30", - "@types/react": "^18.2.14", + "@types/react": "^18.2.70", "@types/react-dom": "^18.2.7", "@types/react-katex": "^3.0.0", "@types/spark-md5": "^3.0.4", diff --git a/yarn.lock b/yarn.lock index 98cabc070..d3ab82de0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1632,10 +1632,10 @@ dependencies: "@types/react" "*" -"@types/react@*", "@types/react@^18.2.14": - version "18.2.14" - resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.14.tgz#fa7a6fecf1ce35ca94e74874f70c56ce88f7a127" - integrity sha512-A0zjq+QN/O0Kpe30hA1GidzyFjatVvrpIvWLxD+xv67Vt91TWWgco9IvrJBkeyHm1trGaFS/FSGqPlhyeZRm0g== +"@types/react@*", "@types/react@^18.2.70": + version "18.2.70" + resolved "https://registry.yarnpkg.com/@types/react/-/react-18.2.70.tgz#89a37f9e0a6a4931f4259c598f40fd44dd6abf71" + integrity sha512-hjlM2hho2vqklPhopNkXkdkeq6Lv8WSZTpr7956zY+3WS5cfYUewtCzsJLsbW5dEv3lfSeQ4W14ZFeKC437JRQ== dependencies: "@types/prop-types" "*" "@types/scheduler" "*" From 76603d108d9b77ffcaf22affa5ad8707fcb92a39 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 26 Mar 2024 05:42:55 +0000 Subject: [PATCH 20/21] chore(deps-dev): bump @tauri-apps/cli from 1.5.7 to 1.5.11 Bumps [@tauri-apps/cli](https://github.com/tauri-apps/tauri) from 1.5.7 to 1.5.11. - [Release notes](https://github.com/tauri-apps/tauri/releases) - [Commits](https://github.com/tauri-apps/tauri/compare/@tauri-apps/cli-v1.5.7...@tauri-apps/cli-v1.5.11) --- updated-dependencies: - dependency-name: "@tauri-apps/cli" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 108 +++++++++++++++++++++++++-------------------------- 2 files changed, 55 insertions(+), 55 deletions(-) diff --git a/package.json b/package.json index 38bbc73c7..7fcda1cb5 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "zustand": "^4.3.8" }, "devDependencies": { - "@tauri-apps/cli": "1.5.7", + "@tauri-apps/cli": "1.5.11", "@types/node": "^20.11.30", "@types/react": "^18.2.70", "@types/react-dom": "^18.2.7", diff --git a/yarn.lock b/yarn.lock index edd7375d2..12e55ce9b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1438,71 +1438,71 @@ dependencies: tslib "^2.4.0" -"@tauri-apps/cli-darwin-arm64@1.5.7": - version "1.5.7" - resolved "https://registry.yarnpkg.com/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.5.7.tgz#3435f1b6c4b431e0283f94c3a0bd486be66b24ee" - integrity sha512-eUpOUhs2IOpKaLa6RyGupP2owDLfd0q2FR/AILzryjtBtKJJRDQQvuotf+LcbEce2Nc2AHeYJIqYAsB4sw9K+g== +"@tauri-apps/cli-darwin-arm64@1.5.11": + version "1.5.11" + resolved "https://registry.yarnpkg.com/@tauri-apps/cli-darwin-arm64/-/cli-darwin-arm64-1.5.11.tgz#a831f98f685148e46e8050dbdddbf4bcdda9ddc6" + integrity sha512-2NLSglDb5VfvTbMtmOKWyD+oaL/e8Z/ZZGovHtUFyUSFRabdXc6cZOlcD1BhFvYkHqm+TqGaz5qtPR5UbqDs8A== -"@tauri-apps/cli-darwin-x64@1.5.7": - version "1.5.7" - resolved "https://registry.yarnpkg.com/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.5.7.tgz#d3d646e790067158d14a1f631a50c67dc05e3360" - integrity sha512-zfumTv1xUuR+RB1pzhRy+51tB6cm8I76g0xUBaXOfEdOJ9FqW5GW2jdnEUbpNuU65qJ1lB8LVWHKGrSWWKazew== +"@tauri-apps/cli-darwin-x64@1.5.11": + version "1.5.11" + resolved "https://registry.yarnpkg.com/@tauri-apps/cli-darwin-x64/-/cli-darwin-x64-1.5.11.tgz#0afae17fe1e84b9699a6b9824cd83b60c6ebfa59" + integrity sha512-/RQllHiJRH2fJOCudtZlaUIjofkHzP3zZgxi71ZUm7Fy80smU5TDfwpwOvB0wSVh0g/ciDjMArCSTo0MRvL+ag== -"@tauri-apps/cli-linux-arm-gnueabihf@1.5.7": - version "1.5.7" - resolved "https://registry.yarnpkg.com/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.5.7.tgz#049c12980cdfd67fe9e5163762bf77f3c85f6956" - integrity sha512-JngWNqS06bMND9PhiPWp0e+yknJJuSozsSbo+iMzHoJNRauBZCUx+HnUcygUR66Cy6qM4eJvLXtsRG7ApxvWmg== +"@tauri-apps/cli-linux-arm-gnueabihf@1.5.11": + version "1.5.11" + resolved "https://registry.yarnpkg.com/@tauri-apps/cli-linux-arm-gnueabihf/-/cli-linux-arm-gnueabihf-1.5.11.tgz#c46166d7f6c1022105a13d530b1d1336f628981f" + integrity sha512-IlBuBPKmMm+a5LLUEK6a21UGr9ZYd6zKuKLq6IGM4tVweQa8Sf2kP2Nqs74dMGIUrLmMs0vuqdURpykQg+z4NQ== -"@tauri-apps/cli-linux-arm64-gnu@1.5.7": - version "1.5.7" - resolved "https://registry.yarnpkg.com/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.5.7.tgz#d1c143da15cba74eebfaaf1662f0734e30f97562" - integrity sha512-WyIYP9BskgBGq+kf4cLAyru8ArrxGH2eMYGBJvuNEuSaqBhbV0i1uUxvyWdazllZLAEz1WvSocUmSwLknr1+sQ== +"@tauri-apps/cli-linux-arm64-gnu@1.5.11": + version "1.5.11" + resolved "https://registry.yarnpkg.com/@tauri-apps/cli-linux-arm64-gnu/-/cli-linux-arm64-gnu-1.5.11.tgz#fd5c539a03371e0ab6cd00563dced1610ceb8943" + integrity sha512-w+k1bNHCU/GbmXshtAhyTwqosThUDmCEFLU4Zkin1vl2fuAtQry2RN7thfcJFepblUGL/J7yh3Q/0+BCjtspKQ== -"@tauri-apps/cli-linux-arm64-musl@1.5.7": - version "1.5.7" - resolved "https://registry.yarnpkg.com/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.7.tgz#f79a17f5360a8ab25b90f3a8e9e6327d5378072f" - integrity sha512-OrDpihQP2MB0JY1a/wP9wsl9dDjFDpVEZOQxt4hU+UVGRCZQok7ghPBg4+Xpd1CkNkcCCuIeY8VxRvwLXpnIzg== +"@tauri-apps/cli-linux-arm64-musl@1.5.11": + version "1.5.11" + resolved "https://registry.yarnpkg.com/@tauri-apps/cli-linux-arm64-musl/-/cli-linux-arm64-musl-1.5.11.tgz#bf7f940c3aca981d7c240857a86568d5b6e8310f" + integrity sha512-PN6/dl+OfYQ/qrAy4HRAfksJ2AyWQYn2IA/2Wwpaa7SDRz2+hzwTQkvajuvy0sQ5L2WCG7ymFYRYMbpC6Hk9Pg== -"@tauri-apps/cli-linux-x64-gnu@1.5.7": - version "1.5.7" - resolved "https://registry.yarnpkg.com/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.5.7.tgz#2cbd17998dcfc8a465d61f30ac9e99ae65e2c2e8" - integrity sha512-4T7FAYVk76rZi8VkuLpiKUAqaSxlva86C1fHm/RtmoTKwZEV+MI3vIMoVg+AwhyWIy9PS55C75nF7+OwbnFnvQ== +"@tauri-apps/cli-linux-x64-gnu@1.5.11": + version "1.5.11" + resolved "https://registry.yarnpkg.com/@tauri-apps/cli-linux-x64-gnu/-/cli-linux-x64-gnu-1.5.11.tgz#17323105e3863a3f36d51771e642e489037ba59b" + integrity sha512-MTVXLi89Nj7Apcvjezw92m7ZqIDKT5SFKZtVPCg6RoLUBTzko/BQoXYIRWmdoz2pgkHDUHgO2OMJ8oKzzddXbw== -"@tauri-apps/cli-linux-x64-musl@1.5.7": - version "1.5.7" - resolved "https://registry.yarnpkg.com/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.7.tgz#d5d4ddded945cc781568d72b7eba367121f28525" - integrity sha512-LL9aMK601BmQjAUDcKWtt5KvAM0xXi0iJpOjoUD3LPfr5dLvBMTflVHQDAEtuZexLQyqpU09+60781PrI/FCTw== +"@tauri-apps/cli-linux-x64-musl@1.5.11": + version "1.5.11" + resolved "https://registry.yarnpkg.com/@tauri-apps/cli-linux-x64-musl/-/cli-linux-x64-musl-1.5.11.tgz#83e22026771ec8ab094922ab114a7385532aa16c" + integrity sha512-kwzAjqFpz7rvTs7WGZLy/a5nS5t15QKr3E9FG95MNF0exTl3d29YoAUAe1Mn0mOSrTJ9Z+vYYAcI/QdcsGBP+w== -"@tauri-apps/cli-win32-arm64-msvc@1.5.7": - version "1.5.7" - resolved "https://registry.yarnpkg.com/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-1.5.7.tgz#05a1bd4e2bc692bad995edb9d07e616cc5682fd5" - integrity sha512-TmAdM6GVkfir3AUFsDV2gyc25kIbJeAnwT72OnmJGAECHs/t/GLP9IkFLLVcFKsiosRf8BXhVyQ84NYkSWo14w== +"@tauri-apps/cli-win32-arm64-msvc@1.5.11": + version "1.5.11" + resolved "https://registry.yarnpkg.com/@tauri-apps/cli-win32-arm64-msvc/-/cli-win32-arm64-msvc-1.5.11.tgz#817874d230fdb09e7211013006a9a22f66ace573" + integrity sha512-L+5NZ/rHrSUrMxjj6YpFYCXp6wHnq8c8SfDTBOX8dO8x+5283/vftb4vvuGIsLS4UwUFXFnLt3XQr44n84E67Q== -"@tauri-apps/cli-win32-ia32-msvc@1.5.7": - version "1.5.7" - resolved "https://registry.yarnpkg.com/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.5.7.tgz#8c832f4dc88374255ef1cda4d2d6a6d61a921388" - integrity sha512-bqWfxwCfLmrfZy69sEU19KHm5TFEaMb8KIekd4aRq/kyOlrjKLdZxN1PyNRP8zpJA1lTiRHzfUDfhpmnZH/skg== +"@tauri-apps/cli-win32-ia32-msvc@1.5.11": + version "1.5.11" + resolved "https://registry.yarnpkg.com/@tauri-apps/cli-win32-ia32-msvc/-/cli-win32-ia32-msvc-1.5.11.tgz#dee1a00eb9e216415d9d6ab9386c35849613c560" + integrity sha512-oVlD9IVewrY0lZzTdb71kNXkjdgMqFq+ohb67YsJb4Rf7o8A9DTlFds1XLCe3joqLMm4M+gvBKD7YnGIdxQ9vA== -"@tauri-apps/cli-win32-x64-msvc@1.5.7": - version "1.5.7" - resolved "https://registry.yarnpkg.com/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.5.7.tgz#adfcce46f796dd22ef69fb26ad8c6972a3263985" - integrity sha512-OxLHVBNdzyQ//xT3kwjQFnJTn/N5zta/9fofAkXfnL7vqmVn6s/RY1LDa3sxCHlRaKw0n3ShpygRbM9M8+sO9w== +"@tauri-apps/cli-win32-x64-msvc@1.5.11": + version "1.5.11" + resolved "https://registry.yarnpkg.com/@tauri-apps/cli-win32-x64-msvc/-/cli-win32-x64-msvc-1.5.11.tgz#c003ce00b36d056a8b08e0ecf4633c2bba00c497" + integrity sha512-1CexcqUFCis5ypUIMOKllxUBrna09McbftWENgvVXMfA+SP+yPDPAVb8fIvUcdTIwR/yHJwcIucmTB4anww4vg== -"@tauri-apps/cli@1.5.7": - version "1.5.7" - resolved "https://registry.yarnpkg.com/@tauri-apps/cli/-/cli-1.5.7.tgz#8f9a8bf577a39b7f7c0e5b125e7b5b3e149cfb5a" - integrity sha512-z7nXLpDAYfQqR5pYhQlWOr88DgPq1AfQyxHhGiakiVgWlaG0ikEfQxop2txrd52H0TRADG0JHR9vFrVFPv4hVQ== +"@tauri-apps/cli@1.5.11": + version "1.5.11" + resolved "https://registry.yarnpkg.com/@tauri-apps/cli/-/cli-1.5.11.tgz#02beb559b3b55836c90a1ba9121b3fc50e3760cd" + integrity sha512-B475D7phZrq5sZ3kDABH4g2mEoUIHtnIO+r4ZGAAfsjMbZCwXxR/jlMGTEL+VO3YzjpF7gQe38IzB4vLBbVppw== optionalDependencies: - "@tauri-apps/cli-darwin-arm64" "1.5.7" - "@tauri-apps/cli-darwin-x64" "1.5.7" - "@tauri-apps/cli-linux-arm-gnueabihf" "1.5.7" - "@tauri-apps/cli-linux-arm64-gnu" "1.5.7" - "@tauri-apps/cli-linux-arm64-musl" "1.5.7" - "@tauri-apps/cli-linux-x64-gnu" "1.5.7" - "@tauri-apps/cli-linux-x64-musl" "1.5.7" - "@tauri-apps/cli-win32-arm64-msvc" "1.5.7" - "@tauri-apps/cli-win32-ia32-msvc" "1.5.7" - "@tauri-apps/cli-win32-x64-msvc" "1.5.7" + "@tauri-apps/cli-darwin-arm64" "1.5.11" + "@tauri-apps/cli-darwin-x64" "1.5.11" + "@tauri-apps/cli-linux-arm-gnueabihf" "1.5.11" + "@tauri-apps/cli-linux-arm64-gnu" "1.5.11" + "@tauri-apps/cli-linux-arm64-musl" "1.5.11" + "@tauri-apps/cli-linux-x64-gnu" "1.5.11" + "@tauri-apps/cli-linux-x64-musl" "1.5.11" + "@tauri-apps/cli-win32-arm64-msvc" "1.5.11" + "@tauri-apps/cli-win32-ia32-msvc" "1.5.11" + "@tauri-apps/cli-win32-x64-msvc" "1.5.11" "@trysound/sax@0.2.0": version "0.2.0" From 53fb52c6c029493589facd13949362da062bab3b Mon Sep 17 00:00:00 2001 From: hmhuming <461669486@qq.com> Date: Wed, 27 Mar 2024 17:58:55 +0800 Subject: [PATCH 21/21] fix docker --- .dockerignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index a88c7d616..95ed9e268 100644 --- a/.dockerignore +++ b/.dockerignore @@ -63,7 +63,7 @@ dist # Gatsby files .cache/ -public + # Vuepress build output .vuepress/dist