diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml index aebba28f7..7e74cf045 100644 --- a/.github/workflows/app.yml +++ b/.github/workflows/app.yml @@ -43,12 +43,9 @@ jobs: - os: ubuntu-latest arch: x86_64 rust_target: x86_64-unknown-linux-gnu - - os: macos-latest - arch: x86_64 - rust_target: x86_64-apple-darwin - os: macos-latest arch: aarch64 - rust_target: aarch64-apple-darwin + rust_target: x86_64-apple-darwin,aarch64-apple-darwin - os: windows-latest arch: x86_64 rust_target: x86_64-pc-windows-msvc @@ -60,13 +57,14 @@ jobs: uses: actions/setup-node@v3 with: node-version: 18 + cache: 'yarn' - name: install Rust stable uses: dtolnay/rust-toolchain@stable with: targets: ${{ matrix.config.rust_target }} - uses: Swatinem/rust-cache@v2 with: - key: ${{ matrix.config.rust_target }} + key: ${{ matrix.config.os }} - name: install dependencies (ubuntu only) if: matrix.config.os == 'ubuntu-latest' run: | @@ -79,8 +77,15 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }} TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }} + APPLE_CERTIFICATE: ${{ secrets.APPLE_CERTIFICATE }} + APPLE_CERTIFICATE_PASSWORD: ${{ secrets.APPLE_CERTIFICATE_PASSWORD }} + APPLE_SIGNING_IDENTITY: ${{ secrets.APPLE_SIGNING_IDENTITY }} + APPLE_ID: ${{ secrets.APPLE_ID }} + APPLE_PASSWORD: ${{ secrets.APPLE_PASSWORD }} + APPLE_TEAM_ID: ${{ secrets.APPLE_TEAM_ID }} with: releaseId: ${{ needs.create-release.outputs.release_id }} + args: ${{ matrix.config.os == 'macos-latest' && '--target universal-apple-darwin' || '' }} publish-release: permissions: diff --git a/.github/workflows/deploy_preview.yml b/.github/workflows/deploy_preview.yml new file mode 100644 index 000000000..bdbb78c27 --- /dev/null +++ b/.github/workflows/deploy_preview.yml @@ -0,0 +1,84 @@ +name: VercelPreviewDeployment + +on: + pull_request_target: + types: + - opened + - synchronize + - reopened + +env: + VERCEL_TEAM: ${{ secrets.VERCEL_TEAM }} + VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + VERCEL_PR_DOMAIN_SUFFIX: ${{ secrets.VERCEL_PR_DOMAIN_SUFFIX }} + +permissions: + contents: read + statuses: write + pull-requests: write + +jobs: + deploy-preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> "$GITHUB_OUTPUT" + id: extract_branch + + - name: Hash branch name + uses: pplanel/hash-calculator-action@v1.3.1 + id: hash_branch + with: + input: ${{ steps.extract_branch.outputs.branch }} + method: MD5 + + - name: Set Environment Variables + id: set_env + if: github.event_name == 'pull_request_target' + run: | + echo "VERCEL_ALIAS_DOMAIN=${{ github.event.pull_request.number }}-${{ github.workflow }}.${VERCEL_PR_DOMAIN_SUFFIX}" >> $GITHUB_OUTPUT + + - name: Install Vercel CLI + run: npm install --global vercel@latest + + - name: Cache dependencies + uses: actions/cache@v2 + id: cache-npm + with: + path: ~/.npm + key: npm-${{ hashFiles('package-lock.json') }} + restore-keys: npm- + + - name: Pull Vercel Environment Information + run: vercel pull --yes --environment=preview --token=${VERCEL_TOKEN} + + - name: Deploy Project Artifacts to Vercel + id: vercel + env: + META_TAG: ${{ steps.hash_branch.outputs.digest }}-${{ github.run_number }}-${{ github.run_attempt}} + run: | + set -e + vercel pull --yes --environment=preview --token=${VERCEL_TOKEN} + vercel build --token=${VERCEL_TOKEN} + vercel deploy --prebuilt --archive=tgz --token=${VERCEL_TOKEN} --meta base_hash=${{ env.META_TAG }} + + DEFAULT_URL=$(vercel ls --token=${VERCEL_TOKEN} --meta base_hash=${{ env.META_TAG }}) + ALIAS_URL=$(vercel alias set ${DEFAULT_URL} ${{ steps.set_env.outputs.VERCEL_ALIAS_DOMAIN }} --token=${VERCEL_TOKEN} --scope ${VERCEL_TEAM}| awk '{print $3}') + + echo "New preview URL: ${DEFAULT_URL}" + echo "New alias URL: ${ALIAS_URL}" + echo "VERCEL_URL=${ALIAS_URL}" >> "$GITHUB_OUTPUT" + + - uses: mshick/add-pr-comment@v2 + with: + message: | + Your build has completed! + + [Preview deployment](${{ steps.vercel.outputs.VERCEL_URL }}) diff --git a/.github/workflows/remove_deploy_preview.yml b/.github/workflows/remove_deploy_preview.yml new file mode 100644 index 000000000..4846cda2d --- /dev/null +++ b/.github/workflows/remove_deploy_preview.yml @@ -0,0 +1,40 @@ +name: Removedeploypreview + +permissions: + contents: read + statuses: write + pull-requests: write + +env: + VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} + VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} + VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} + +on: + pull_request_target: + types: + - closed + +jobs: + delete-deployments: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Extract branch name + shell: bash + run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT + id: extract_branch + + - name: Hash branch name + uses: pplanel/hash-calculator-action@v1.3.1 + id: hash_branch + with: + input: ${{ steps.extract_branch.outputs.branch }} + method: MD5 + + - name: Call the delete-deployment-preview.sh script + env: + META_TAG: ${{ steps.hash_branch.outputs.digest }} + run: | + bash ./scripts/delete-deployment-preview.sh diff --git a/README.md b/README.md index fec3ec108..3ac537abc 100644 --- a/README.md +++ b/README.md @@ -14,9 +14,9 @@ One-Click to get a well-designed cross-platform ChatGPT web UI, with GPT3, GPT4 [![MacOS][MacOS-image]][download-url] [![Linux][Linux-image]][download-url] -[Web App](https://app.nextchat.dev/) / [Desktop App](https://github.com/Yidadaa/ChatGPT-Next-Web/releases) / [Discord](https://discord.gg/YCkeafCafC) / [Twitter](https://twitter.com/mortiest_ricky) / [Buy Me a Coffee](https://www.buymeacoffee.com/yidadaa) +[Web App](https://app.nextchat.dev/) / [Desktop App](https://github.com/Yidadaa/ChatGPT-Next-Web/releases) / [Discord](https://discord.gg/YCkeafCafC) / [Twitter](https://twitter.com/NextChatDev) -[网页版](https://app.nextchat.dev/) / [客户端](https://github.com/Yidadaa/ChatGPT-Next-Web/releases) / [反馈](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) / [QQ 群](https://github.com/Yidadaa/ChatGPT-Next-Web/discussions/1724) / [打赏开发者](https://user-images.githubusercontent.com/16968934/227772541-5bcd52d8-61b7-488c-a203-0330d8006e2b.jpg) +[网页版](https://app.nextchat.dev/) / [客户端](https://github.com/Yidadaa/ChatGPT-Next-Web/releases) / [反馈](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) [web-url]: https://chatgpt.nextweb.fun [download-url]: https://github.com/Yidadaa/ChatGPT-Next-Web/releases diff --git a/README_CN.md b/README_CN.md index 0f390a51c..4acefefa5 100644 --- a/README_CN.md +++ b/README_CN.md @@ -5,7 +5,7 @@ 一键免费部署你的私人 ChatGPT 网页应用,支持 GPT3, GPT4 & Gemini Pro 模型。 -[演示 Demo](https://chat-gpt-next-web.vercel.app/) / [反馈 Issues](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) / [加入 Discord](https://discord.gg/zrhvHCr79N) / [QQ 群](https://user-images.githubusercontent.com/16968934/228190818-7dd00845-e9b9-4363-97e5-44c507ac76da.jpeg) / [打赏开发者](https://user-images.githubusercontent.com/16968934/227772541-5bcd52d8-61b7-488c-a203-0330d8006e2b.jpg) / [Donate](#捐赠-donate-usdt) +[演示 Demo](https://chat-gpt-next-web.vercel.app/) / [反馈 Issues](https://github.com/Yidadaa/ChatGPT-Next-Web/issues) / [加入 Discord](https://discord.gg/zrhvHCr79N) [![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) diff --git a/app/api/cors/[...path]/route.ts b/app/api/cors/[...path]/route.ts index 0217b12b0..1f70d6630 100644 --- a/app/api/cors/[...path]/route.ts +++ b/app/api/cors/[...path]/route.ts @@ -40,4 +40,4 @@ export const POST = handle; export const GET = handle; export const OPTIONS = handle; -export const runtime = "nodejs"; +export const runtime = "edge"; diff --git a/app/api/google/[...path]/route.ts b/app/api/google/[...path]/route.ts index 869bd5076..ebd192891 100644 --- a/app/api/google/[...path]/route.ts +++ b/app/api/google/[...path]/route.ts @@ -101,19 +101,14 @@ export const POST = handle; export const runtime = "edge"; export const preferredRegion = [ - "arn1", "bom1", - "cdg1", "cle1", "cpt1", - "dub1", - "fra1", "gru1", "hnd1", "iad1", "icn1", "kix1", - "lhr1", "pdx1", "sfo1", "sin1", diff --git a/app/client/api.ts b/app/client/api.ts index 56fa32996..4b39fbfae 100644 --- a/app/client/api.ts +++ b/app/client/api.ts @@ -144,10 +144,10 @@ export function getHeaders() { const headers: Record = { "Content-Type": "application/json", "x-requested-with": "XMLHttpRequest", - "Accept": "application/json", + Accept: "application/json", }; const modelConfig = useChatStore.getState().currentSession().mask.modelConfig; - const isGoogle = modelConfig.model === "gemini-pro"; + const isGoogle = modelConfig.model.startsWith("gemini"); const isAzure = accessStore.provider === ServiceProvider.Azure; const authHeader = isAzure ? "api-key" : "Authorization"; const apiKey = isGoogle @@ -155,20 +155,23 @@ export function getHeaders() { : isAzure ? accessStore.azureApiKey : accessStore.openaiApiKey; - + const clientConfig = getClientConfig(); const makeBearer = (s: string) => `${isAzure ? "" : "Bearer "}${s.trim()}`; const validString = (x: string) => x && x.length > 0; - // use user's api key first - if (validString(apiKey)) { - headers[authHeader] = makeBearer(apiKey); - } else if ( - accessStore.enabledAccessControl() && - validString(accessStore.accessCode) - ) { - headers[authHeader] = makeBearer( - ACCESS_CODE_PREFIX + accessStore.accessCode, - ); + // when using google api in app, not set auth header + if (!(isGoogle && clientConfig?.isApp)) { + // use user's api key first + if (validString(apiKey)) { + headers[authHeader] = makeBearer(apiKey); + } else if ( + accessStore.enabledAccessControl() && + validString(accessStore.accessCode) + ) { + headers[authHeader] = makeBearer( + ACCESS_CODE_PREFIX + accessStore.accessCode, + ); + } } return headers; diff --git a/app/client/platforms/google.ts b/app/client/platforms/google.ts index f0f63659f..6832400ca 100644 --- a/app/client/platforms/google.ts +++ b/app/client/platforms/google.ts @@ -1,15 +1,8 @@ import { Google, REQUEST_TIMEOUT_MS } from "@/app/constant"; import { ChatOptions, getHeaders, LLMApi, LLMModel, LLMUsage } from "../api"; import { useAccessStore, useAppConfig, useChatStore } from "@/app/store"; -import { - EventStreamContentType, - fetchEventSource, -} from "@fortaine/fetch-event-source"; -import { prettyObject } from "@/app/utils/format"; import { getClientConfig } from "@/app/config/client"; -import Locale from "../../locales"; -import { getServerSideConfig } from "@/app/config/server"; -import de from "@/app/locales/de"; +import { DEFAULT_API_HOST } from "@/app/constant"; export class GeminiProApi implements LLMApi { extractMessage(res: any) { console.log("[Response] gemini-pro response: ", res); @@ -21,7 +14,7 @@ export class GeminiProApi implements LLMApi { ); } async chat(options: ChatOptions): Promise { - const apiClient = this; + // const apiClient = this; const messages = options.messages.map((v) => ({ role: v.role.replace("assistant", "model").replace("system", "user"), parts: [{ text: v.content }], @@ -79,13 +72,27 @@ export class GeminiProApi implements LLMApi { ], }; - console.log("[Request] google payload: ", requestPayload); + const accessStore = useAccessStore.getState(); + let baseUrl = accessStore.googleUrl; + const isApp = !!getClientConfig()?.isApp; - const shouldStream = !!options.config.stream; + let shouldStream = !!options.config.stream; const controller = new AbortController(); options.onController?.(controller); try { - const chatPath = this.path(Google.ChatPath); + let chatPath = this.path(Google.ChatPath); + + // let baseUrl = accessStore.googleUrl; + + if (!baseUrl) { + baseUrl = isApp + ? DEFAULT_API_HOST + "/api/proxy/google/" + Google.ChatPath + : chatPath; + } + + if (isApp) { + baseUrl += `?key=${accessStore.googleApiKey}`; + } const chatPayload = { method: "POST", body: JSON.stringify(requestPayload), @@ -101,10 +108,6 @@ export class GeminiProApi implements LLMApi { if (shouldStream) { let responseText = ""; let remainText = ""; - let streamChatPath = chatPath.replace( - "generateContent", - "streamGenerateContent", - ); let finished = false; let existingTexts: string[] = []; @@ -134,7 +137,11 @@ export class GeminiProApi implements LLMApi { // start animaion animateResponseText(); - fetch(streamChatPath, chatPayload) + + fetch( + baseUrl.replace("generateContent", "streamGenerateContent"), + chatPayload, + ) .then((response) => { const reader = response?.body?.getReader(); const decoder = new TextDecoder(); @@ -185,11 +192,9 @@ export class GeminiProApi implements LLMApi { console.error("Error:", error); }); } else { - const res = await fetch(chatPath, chatPayload); + const res = await fetch(baseUrl, chatPayload); clearTimeout(requestTimeoutId); - const resJson = await res.json(); - if (resJson?.promptFeedback?.blockReason) { // being blocked options.onError?.( diff --git a/app/client/platforms/openai.ts b/app/client/platforms/openai.ts index 68a0fda75..3c3a51801 100644 --- a/app/client/platforms/openai.ts +++ b/app/client/platforms/openai.ts @@ -1,3 +1,4 @@ +"use client"; import { ApiPath, DEFAULT_API_HOST, @@ -45,7 +46,9 @@ export class ChatGPTApi implements LLMApi { if (baseUrl.length === 0) { const isApp = !!getClientConfig()?.isApp; - baseUrl = isApp ? DEFAULT_API_HOST : ApiPath.OpenAI; + baseUrl = isApp + ? DEFAULT_API_HOST + "/proxy" + ApiPath.OpenAI + : ApiPath.OpenAI; } if (baseUrl.endsWith("/")) { @@ -59,6 +62,8 @@ export class ChatGPTApi implements LLMApi { path = makeAzurePath(path, accessStore.azureApiVersion); } + console.log("[Proxy Endpoint] ", baseUrl, path); + return [baseUrl, path].join("/"); } diff --git a/app/components/emoji.tsx b/app/components/emoji.tsx index a2a50320d..b24349307 100644 --- a/app/components/emoji.tsx +++ b/app/components/emoji.tsx @@ -13,7 +13,7 @@ export function getEmojiUrl(unified: string, style: EmojiStyle) { // Whoever owns this Content Delivery Network (CDN), I am using your CDN to serve emojis // Old CDN broken, so I had to switch to this one // Author: https://github.com/H0llyW00dzZ - return `https://cdn.jsdelivr.net/npm/emoji-datasource-apple/img/${style}/64/${unified}.png`; + return `https://fastly.jsdelivr.net/npm/emoji-datasource-apple/img/${style}/64/${unified}.png`; } export function AvatarPicker(props: { diff --git a/app/components/exporter.tsx b/app/components/exporter.tsx index dff17e4ab..c17ebc8d8 100644 --- a/app/components/exporter.tsx +++ b/app/components/exporter.tsx @@ -307,7 +307,7 @@ export function PreviewActions(props: { setShouldExport(false); var api: ClientApi; - if (config.modelConfig.model === "gemini-pro") { + if (config.modelConfig.model.startsWith("gemini")) { api = new ClientApi(ModelProvider.GeminiPro); } else { api = new ClientApi(ModelProvider.GPT); diff --git a/app/components/home.tsx b/app/components/home.tsx index 4be7da0fb..8386ba144 100644 --- a/app/components/home.tsx +++ b/app/components/home.tsx @@ -171,7 +171,7 @@ export function useLoadData() { const config = useAppConfig(); var api: ClientApi; - if (config.modelConfig.model === "gemini-pro") { + if (config.modelConfig.model.startsWith("gemini")) { api = new ClientApi(ModelProvider.GeminiPro); } else { api = new ClientApi(ModelProvider.GPT); diff --git a/app/components/model-config.tsx b/app/components/model-config.tsx index b9f811674..e46a018f4 100644 --- a/app/components/model-config.tsx +++ b/app/components/model-config.tsx @@ -92,7 +92,7 @@ export function ModelConfigList(props: { > - {props.modelConfig.model === "gemini-pro" ? null : ( + {props.modelConfig.model.startsWith("gemini") ? null : ( <> { - return syncStore.coundSync(); + return syncStore.cloudSync(); }, [syncStore]); const [checkState, setCheckState] = useState< @@ -472,7 +472,7 @@ function SyncItems() { const promptStore = usePromptStore(); const maskStore = useMaskStore(); const couldSync = useMemo(() => { - return syncStore.coundSync(); + return syncStore.cloudSync(); }, [syncStore]); const [showSyncConfigModal, setShowSyncConfigModal] = useState(false); diff --git a/app/config/server.ts b/app/config/server.ts index c6251a5c2..c455d0b73 100644 --- a/app/config/server.ts +++ b/app/config/server.ts @@ -89,6 +89,8 @@ export const getServerSideConfig = () => { googleApiKey: process.env.GOOGLE_API_KEY, googleUrl: process.env.GOOGLE_URL, + gtmId: process.env.GTM_ID, + needCode: ACCESS_CODES.size > 0, code: process.env.CODE, codes: ACCESS_CODES, diff --git a/app/constant.ts b/app/constant.ts index 53d47540a..aa38f4407 100644 --- a/app/constant.ts +++ b/app/constant.ts @@ -8,8 +8,7 @@ export const FETCH_COMMIT_URL = `https://api.github.com/repos/${OWNER}/${REPO}/c export const FETCH_TAG_URL = `https://api.github.com/repos/${OWNER}/${REPO}/tags?per_page=1`; export const RUNTIME_CONFIG_DOM = "danger-runtime-config"; -export const DEFAULT_CORS_HOST = "https://a.nextweb.fun"; -export const DEFAULT_API_HOST = `${DEFAULT_CORS_HOST}/api/proxy`; +export const DEFAULT_API_HOST = "https://api.nextchat.dev"; export const OPENAI_BASE_URL = "https://api.openai.com"; export const GEMINI_BASE_URL = "https://generativelanguage.googleapis.com/"; @@ -95,7 +94,7 @@ export const Google = { export const DEFAULT_INPUT_TEMPLATE = `{{input}}`; // input / time / model / lang export const DEFAULT_SYSTEM_TEMPLATE = ` -You are ChatGPT, a large language model trained by OpenAI. +You are ChatGPT, a large language model trained by {{ServiceProvider}}. Knowledge cutoff: {{cutoff}} Current model: {{model}} Current time: {{time}} @@ -107,8 +106,13 @@ export const SUMMARIZE_MODEL = "gpt-3.5-turbo"; export const KnowledgeCutOffDate: Record = { default: "2021-09", + "gpt-4-turbo-preview": "2023-04", "gpt-4-1106-preview": "2023-04", + "gpt-4-0125-preview": "2023-04", "gpt-4-vision-preview": "2023-04", + // After improvements, + // it's now easier to add "KnowledgeCutOffDate" instead of stupid hardcoding it, as was done previously. + "gemini-pro": "2023-12", }; export const DEFAULT_MODELS = [ @@ -166,6 +170,15 @@ export const DEFAULT_MODELS = [ providerType: "openai", }, }, + { + name: "gpt-4-turbo-preview", + available: true, + provider: { + id: "openai", + providerName: "OpenAI", + providerType: "openai", + }, + }, { name: "gpt-4-1106-preview", available: true, @@ -175,6 +188,15 @@ export const DEFAULT_MODELS = [ providerType: "openai", }, }, + { + name: "gpt-4-0125-preview", + available: true, + provider: { + id: "openai", + providerName: "OpenAI", + providerType: "openai", + }, + }, { name: "gpt-4-vision-preview", available: true, @@ -193,6 +215,15 @@ export const DEFAULT_MODELS = [ providerType: "openai", }, }, + { + name: "gpt-3.5-turbo-0125", + available: true, + provider: { + id: "openai", + providerName: "OpenAI", + providerType: "openai", + }, + }, { name: "gpt-3.5-turbo-0301", available: true, diff --git a/app/icons/auto.svg b/app/icons/auto.svg index 6745dfbd0..540ebdd13 100644 --- a/app/icons/auto.svg +++ b/app/icons/auto.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/bot.svg b/app/icons/bot.svg index 6e3af5be7..758a57ebc 100644 --- a/app/icons/bot.svg +++ b/app/icons/bot.svg @@ -1,28 +1 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/icons/break.svg b/app/icons/break.svg index fbfe04f46..903356fb9 100644 --- a/app/icons/break.svg +++ b/app/icons/break.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/cancel.svg b/app/icons/cancel.svg index 390b11166..584b5886f 100644 --- a/app/icons/cancel.svg +++ b/app/icons/cancel.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/chat-settings.svg b/app/icons/chat-settings.svg index 0a37b294c..0f56a263b 100644 --- a/app/icons/chat-settings.svg +++ b/app/icons/chat-settings.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/chat.svg b/app/icons/chat.svg index 697688551..744b2e033 100644 --- a/app/icons/chat.svg +++ b/app/icons/chat.svg @@ -1,27 +1 @@ - - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/icons/chatgpt.svg b/app/icons/chatgpt.svg index 5b9cd93d5..66cd45ce7 100644 --- a/app/icons/chatgpt.svg +++ b/app/icons/chatgpt.svg @@ -1,16 +1 @@ - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/icons/clear.svg b/app/icons/clear.svg index f0430fc47..f43466c96 100644 --- a/app/icons/clear.svg +++ b/app/icons/clear.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/icons/close.svg b/app/icons/close.svg index f8e0ec889..812f3276e 100644 --- a/app/icons/close.svg +++ b/app/icons/close.svg @@ -1,21 +1 @@ - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/icons/cloud-fail.svg b/app/icons/cloud-fail.svg index 6e6a35fe5..a6017ed6c 100644 --- a/app/icons/cloud-fail.svg +++ b/app/icons/cloud-fail.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/cloud-success.svg b/app/icons/cloud-success.svg index 8c5f3d6fd..a8148a895 100644 --- a/app/icons/cloud-success.svg +++ b/app/icons/cloud-success.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/config.svg b/app/icons/config.svg index 7e1d23a27..3334dd274 100644 --- a/app/icons/config.svg +++ b/app/icons/config.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/confirm.svg b/app/icons/confirm.svg index e40fe8aac..f9795381a 100644 --- a/app/icons/confirm.svg +++ b/app/icons/confirm.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/connection.svg b/app/icons/connection.svg index 036873020..7a91a6f57 100644 --- a/app/icons/connection.svg +++ b/app/icons/connection.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/dark.svg b/app/icons/dark.svg index c96c188bb..e2074da48 100644 --- a/app/icons/dark.svg +++ b/app/icons/dark.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/drag.svg b/app/icons/drag.svg index a39157c7e..9c62b56b1 100644 --- a/app/icons/drag.svg +++ b/app/icons/drag.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/edit.svg b/app/icons/edit.svg index 230c57b99..a2bc6020d 100644 --- a/app/icons/edit.svg +++ b/app/icons/edit.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/app/icons/eye-off.svg b/app/icons/eye-off.svg index a0a44f7ac..dd7e0b80a 100644 --- a/app/icons/eye-off.svg +++ b/app/icons/eye-off.svg @@ -1,4 +1 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/icons/eye.svg b/app/icons/eye.svg index b5df29d5b..aab43d431 100644 --- a/app/icons/eye.svg +++ b/app/icons/eye.svg @@ -1,4 +1 @@ - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/icons/light.svg b/app/icons/light.svg index a425e0107..8f7095176 100644 --- a/app/icons/light.svg +++ b/app/icons/light.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/lightning.svg b/app/icons/lightning.svg index d208ad87d..8ce0b7311 100644 --- a/app/icons/lightning.svg +++ b/app/icons/lightning.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/pause.svg b/app/icons/pause.svg index 382f7a939..4e81ef067 100644 --- a/app/icons/pause.svg +++ b/app/icons/pause.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/pin.svg b/app/icons/pin.svg index caf7b0ee4..53f5bb4d0 100644 --- a/app/icons/pin.svg +++ b/app/icons/pin.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/reload.svg b/app/icons/reload.svg index f5ae07a52..be104dd27 100644 --- a/app/icons/reload.svg +++ b/app/icons/reload.svg @@ -1,24 +1 @@ - - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/icons/rename.svg b/app/icons/rename.svg index cee69eb8d..311e0f434 100644 --- a/app/icons/rename.svg +++ b/app/icons/rename.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/return.svg b/app/icons/return.svg index eba5e78f9..630838ff8 100644 --- a/app/icons/return.svg +++ b/app/icons/return.svg @@ -1,21 +1 @@ - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/icons/robot.svg b/app/icons/robot.svg index 62dd9dc8d..08fa0a2ea 100644 --- a/app/icons/robot.svg +++ b/app/icons/robot.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/icons/send-white.svg b/app/icons/send-white.svg index 9c9799f7d..3becbecd8 100644 --- a/app/icons/send-white.svg +++ b/app/icons/send-white.svg @@ -1,21 +1 @@ - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/icons/settings.svg b/app/icons/settings.svg index 6c0e74dff..5a21c8713 100644 --- a/app/icons/settings.svg +++ b/app/icons/settings.svg @@ -1,21 +1 @@ - - - - - - - - - - - - - - \ No newline at end of file + \ No newline at end of file diff --git a/app/icons/upload.svg b/app/icons/upload.svg index f9999a7f9..0bc76e30e 100644 --- a/app/icons/upload.svg +++ b/app/icons/upload.svg @@ -1 +1 @@ - + \ No newline at end of file diff --git a/app/layout.tsx b/app/layout.tsx index be2162475..2c89ba494 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -6,7 +6,7 @@ import { getClientConfig } from "./config/client"; import { type Metadata } from "next"; import { SpeedInsights } from "@vercel/speed-insights/next"; import { getServerSideConfig } from "./config/server"; - +import { GoogleTagManager } from "@next/third-parties/google"; const serverConfig = getServerSideConfig(); export const metadata: Metadata = { @@ -46,6 +46,11 @@ export default function RootLayout({ )} + {serverConfig?.gtmId && ( + <> + + + )} ); diff --git a/app/locales/index.ts b/app/locales/index.ts index cfbdff297..6e8088a98 100644 --- a/app/locales/index.ts +++ b/app/locales/index.ts @@ -16,6 +16,7 @@ import cs from "./cs"; import ko from "./ko"; import ar from "./ar"; import bn from "./bn"; +import sk from "./sk"; import { merge } from "../utils/merge"; import type { LocaleType } from "./cn"; @@ -40,6 +41,7 @@ const ALL_LANGS = { no, ar, bn, + sk, }; export type Lang = keyof typeof ALL_LANGS; @@ -65,6 +67,7 @@ export const ALL_LANG_OPTIONS: Record = { no: "Nynorsk", ar: "العربية", bn: "বাংলা", + sk: "Slovensky", }; const LANG_KEY = "lang"; diff --git a/app/locales/jp.ts b/app/locales/jp.ts index e0ea07c75..dcbd0f282 100644 --- a/app/locales/jp.ts +++ b/app/locales/jp.ts @@ -12,6 +12,13 @@ const jp: PartialLocaleType = { }, Chat: { SubTitle: (count: number) => `ChatGPTとの ${count} 通のチャット`, + EditMessage: { + Title: "全てのメッセージを修正", + Topic: { + Title: "トピック", + SubTitle: "このトピックを変える", + }, + }, Actions: { ChatList: "メッセージリストを表示", CompressedHistory: "圧縮された履歴プロンプトを表示", @@ -47,6 +54,28 @@ const jp: PartialLocaleType = { Download: "ファイルをダウンロード", MessageFromYou: "あなたからのメッセージ", MessageFromChatGPT: "ChatGPTからのメッセージ", + Format: { + Title: "フォーマットをエクスポート", + SubTitle: "マークダウン形式、PNG画像形式を選択できます。", + }, + IncludeContext: { + Title: "コンテキストを含みますか?", + SubTitle: "コンテキストを含ませるか否か", + }, + Steps: { + Select: "エクスポート設定", + Preview: "プレビュー", + }, + Image: { + Toast: "画像生成中...", + Modal: "長押し、または右クリックで保存してください。", + }, + }, + Select: { + Search: "検索", + All: "すべて選択", + Latest: "新しいメッセージを選択", + Clear: "クリア", }, Memory: { Title: "履歴メモリ", @@ -118,6 +147,10 @@ const jp: PartialLocaleType = { Title: "キャラクターページ", SubTitle: "新規チャット作成時にキャラクターページを表示する", }, + Builtin: { + Title: "ビルトインマスクを非表示", + SubTitle: "マスクリストからビルトインを非表示する", + }, }, Prompt: { Disable: { @@ -157,7 +190,6 @@ const jp: PartialLocaleType = { Check: "再確認", NoAccess: "APIキーまたはアクセスパスワードを入力して残高を表示", }, - Model: "モデル (model)", Temperature: { Title: "ランダム性 (temperature)", @@ -176,6 +208,10 @@ const jp: PartialLocaleType = { Title: "話題の頻度 (frequency_penalty)", SubTitle: "値が大きいほど、重複語を低減する可能性が高くなります", }, + AutoGenerateTitle: { + Title: "タイトルの自動生成", + SubTitle: "会話内容に基づいて適切なタイトルを生成する", + }, }, Store: { DefaultTopic: "新しいチャット", diff --git a/app/locales/sk.ts b/app/locales/sk.ts new file mode 100644 index 000000000..66cd8f041 --- /dev/null +++ b/app/locales/sk.ts @@ -0,0 +1,482 @@ +import { getClientConfig } from "../config/client"; +import { SubmitKey } from "../store/config"; +import { LocaleType } from "./index"; +import type { PartialLocaleType } from "./index"; + +// if you are adding a new translation, please use PartialLocaleType instead of LocaleType + +const isApp = !!getClientConfig()?.isApp; +const sk: PartialLocaleType = { + WIP: "Už čoskoro...", + Error: { + Unauthorized: isApp + ? "Neplatný API kľúč, prosím skontrolujte ho na stránke [Nastavenia](/#/settings)." + : "Neoprávnený prístup, prosím zadajte prístupový kód na stránke [auth](/#/auth), alebo zadajte váš OpenAI API kľúč.", + }, + Auth: { + Title: "Potrebný prístupový kód", + Tips: "Prosím, zadajte prístupový kód nižšie", + SubTips: "Alebo zadajte váš OpenAI alebo Google API kľúč", + Input: "prístupový kód", + Confirm: "Potvrdiť", + Later: "Neskôr", + }, + ChatItem: { + ChatItemCount: (count: number) => `${count} správ`, + }, + Chat: { + SubTitle: (count: number) => `${count} správ`, + EditMessage: { + Title: "Upraviť všetky správy", + Topic: { + Title: "Téma", + SubTitle: "Zmeniť aktuálnu tému", + }, + }, + Actions: { + ChatList: "Prejsť na zoznam chatov", + CompressedHistory: "Komprimovaná história výziev", + Export: "Exportovať všetky správy ako Markdown", + Copy: "Kopírovať", + Stop: "Zastaviť", + Retry: "Skúsiť znova", + Pin: "Pripnúť", + PinToastContent: "Pripnuté 1 správy do kontextových výziev", + PinToastAction: "Zobraziť", + Delete: "Vymazať", + Edit: "Upraviť", + }, + Commands: { + new: "Začať nový chat", + newm: "Začať nový chat s maskou", + next: "Ďalší Chat", + prev: "Predchádzajúci Chat", + clear: "Vymazať kontext", + del: "Vymazať Chat", + }, + InputActions: { + Stop: "Zastaviť", + ToBottom: "Na najnovšie", + Theme: { + auto: "Automaticky", + light: "Svetlý motív", + dark: "Tmavý motív", + }, + Prompt: "Výzvy", + Masks: "Masky", + Clear: "Vymazať kontext", + Settings: "Nastavenia", + }, + Rename: "Premenovať Chat", + Typing: "Písanie…", + Input: (submitKey: string) => { + var inputHints = `${submitKey} na odoslanie`; + if (submitKey === String(SubmitKey.Enter)) { + inputHints += ", Shift + Enter na zalomenie"; + } + return inputHints + ", / na vyhľadávanie výziev, : na použitie príkazov"; + }, + Send: "Odoslať", + Config: { + Reset: "Resetovať na predvolené", + SaveAs: "Uložiť ako masku", + }, + IsContext: "Kontextová výzva", + }, + Export: { + Title: "Export správ", + Copy: "Kopírovať všetko", + Download: "Stiahnuť", + MessageFromYou: "Správa od vás", + MessageFromChatGPT: "Správa od ChatGPT", + Share: "Zdieľať na ShareGPT", + Format: { + Title: "Formát exportu", + SubTitle: "Markdown alebo PNG obrázok", + }, + IncludeContext: { + Title: "Vrátane kontextu", + SubTitle: "Exportovať kontextové výzvy v maske alebo nie", + }, + Steps: { + Select: "Vybrať", + Preview: "Náhľad", + }, + Image: { + Toast: "Snímanie obrázka...", + Modal: + "Dlhým stlačením alebo kliknutím pravým tlačidlom myši uložte obrázok", + }, + }, + Select: { + Search: "Hľadať", + All: "Vybrať všetko", + Latest: "Vybrať najnovšie", + Clear: "Vymazať", + }, + Memory: { + Title: "Výzva pamäti", + EmptyContent: "Zatiaľ nič.", + Send: "Odoslať pamäť", + Copy: "Kopírovať pamäť", + Reset: "Resetovať reláciu", + ResetConfirm: + "Resetovaním sa vymaže aktuálna história konverzácie a historická pamäť. Ste si istí, že chcete resetovať?", + }, + Home: { + NewChat: "Nový Chat", + DeleteChat: "Potvrdiť vymazanie vybranej konverzácie?", + DeleteToast: "Chat vymazaný", + Revert: "Vrátiť späť", + }, + Settings: { + Title: "Nastavenia", + SubTitle: "Všetky nastavenia", + Danger: { + Reset: { + Title: "Resetovať všetky nastavenia", + SubTitle: "Resetovať všetky položky nastavení na predvolené", + Action: "Resetovať", + Confirm: "Potvrdiť resetovanie všetkých nastavení na predvolené?", + }, + Clear: { + Title: "Vymazať všetky údaje", + SubTitle: "Vymazať všetky správy a nastavenia", + Action: "Vymazať", + Confirm: "Potvrdiť vymazanie všetkých správ a nastavení?", + }, + }, + Lang: { + Name: "Jazyk", // POZOR: ak pridávate nový preklad, prosím neprekladajte túto hodnotu, nechajte ju ako "Jazyk" + All: "Všetky jazyky", + }, + Avatar: "Avatar", + FontSize: { + Title: "Veľkosť písma", + SubTitle: "Nastaviť veľkosť písma obsahu chatu", + }, + InjectSystemPrompts: { + Title: "Vložiť systémové výzvy", + SubTitle: "Vložiť globálnu systémovú výzvu pre každú požiadavku", + }, + InputTemplate: { + Title: "Šablóna vstupu", + SubTitle: "Najnovšia správa bude vyplnená do tejto šablóny", + }, + + Update: { + Version: (x: string) => `Verzia: ${x}`, + IsLatest: "Najnovšia verzia", + CheckUpdate: "Skontrolovať aktualizácie", + IsChecking: "Kontrola aktualizácií...", + FoundUpdate: (x: string) => `Nájdená nová verzia: ${x}`, + GoToUpdate: "Aktualizovať", + }, + SendKey: "Odoslať kľúč", + Theme: "Motív", + TightBorder: "Tesný okraj", + SendPreviewBubble: { + Title: "Bublina náhľadu odoslania", + SubTitle: "Náhľad markdownu v bubline", + }, + AutoGenerateTitle: { + Title: "Automaticky generovať názov", + SubTitle: "Generovať vhodný názov na základe obsahu konverzácie", + }, + Sync: { + CloudState: "Posledná aktualizácia", + NotSyncYet: "Zatiaľ nesynchronizované", + Success: "Synchronizácia úspešná", + Fail: "Synchronizácia zlyhala", + + Config: { + Modal: { + Title: "Konfigurácia synchronizácie", + Check: "Skontrolovať pripojenie", + }, + SyncType: { + Title: "Typ synchronizácie", + SubTitle: "Vyberte svoju obľúbenú službu synchronizácie", + }, + Proxy: { + Title: "Povoliť CORS Proxy", + SubTitle: "Povoliť proxy na obídenie obmedzení cross-origin", + }, + ProxyUrl: { + Title: "Koncový bod Proxy", + SubTitle: "Platné len pre vstavaný CORS proxy tohto projektu", + }, + + WebDav: { + Endpoint: "Koncový bod WebDAV", + UserName: "Meno používateľa", + Password: "Heslo", + }, + + UpStash: { + Endpoint: "URL REST služby UpStash Redis", + UserName: "Názov zálohy", + Password: "Token REST služby UpStash Redis", + }, + }, + + LocalState: "Lokálne údaje", + Overview: (overview: any) => { + return `${overview.chat} chaty, ${overview.message} správy, ${overview.prompt} výzvy, ${overview.mask} masky`; + }, + ImportFailed: "Import z súboru zlyhal", + }, + Mask: { + Splash: { + Title: "Úvodná obrazovka masky", + SubTitle: "Zobraziť úvodnú obrazovku masky pred začatím nového chatu", + }, + Builtin: { + Title: "Skryť vstavané masky", + SubTitle: "Skryť vstavané masky v zozname masiek", + }, + }, + Prompt: { + Disable: { + Title: "Zakázať automatické dopĺňanie", + SubTitle: "Zadajte / na spustenie automatického dopĺňania", + }, + List: "Zoznam výziev", + ListCount: (builtin: number, custom: number) => + `${builtin} vstavaných, ${custom} užívateľsky definovaných`, + Edit: "Upraviť", + Modal: { + Title: "Zoznam výziev", + Add: "Pridať jednu", + Search: "Hľadať výzvy", + }, + EditModal: { + Title: "Upraviť výzvu", + }, + }, + HistoryCount: { + Title: "Počet pripojených správ", + SubTitle: "Počet odoslaných správ pripojených na požiadavku", + }, + CompressThreshold: { + Title: "Práh kompresie histórie", + SubTitle: + "Bude komprimované, ak dĺžka nekomprimovaných správ presiahne túto hodnotu", + }, + + Usage: { + Title: "Stav účtu", + SubTitle(used: any, total: any) { + return `Tento mesiac použité ${used}, predplatné ${total}`; + }, + IsChecking: "Kontroluje sa...", + Check: "Skontrolovať", + NoAccess: "Zadajte API kľúč na skontrolovanie zostatku", + }, + Access: { + AccessCode: { + Title: "Prístupový kód", + SubTitle: "Povolený prístupový kód", + Placeholder: "Zadajte kód", + }, + CustomEndpoint: { + Title: "Vlastný koncový bod", + SubTitle: "Použiť vlastnú službu Azure alebo OpenAI", + }, + Provider: { + Title: "Poskytovateľ modelu", + SubTitle: "Vyberte Azure alebo OpenAI", + }, + OpenAI: { + ApiKey: { + Title: "API kľúč OpenAI", + SubTitle: "Použiť vlastný API kľúč OpenAI", + Placeholder: "sk-xxx", + }, + + Endpoint: { + Title: "Koncový bod OpenAI", + SubTitle: + "Musí začínať http(s):// alebo použiť /api/openai ako predvolený", + }, + }, + Azure: { + ApiKey: { + Title: "API kľúč Azure", + SubTitle: "Skontrolujte svoj API kľúč v Azure konzole", + Placeholder: "API kľúč Azure", + }, + + Endpoint: { + Title: "Koncový bod Azure", + SubTitle: "Príklad: ", + }, + + ApiVerion: { + Title: "Verzia API Azure", + SubTitle: "Skontrolujte svoju verziu API v Azure konzole", + }, + }, + CustomModel: { + Title: "Vlastné modely", + SubTitle: "Možnosti vlastného modelu, oddelené čiarkou", + }, + Google: { + ApiKey: { + Title: "API kľúč", + SubTitle: + "Obísť obmedzenia prístupu heslom pomocou vlastného API kľúča Google AI Studio", + Placeholder: "API kľúč Google AI Studio", + }, + + Endpoint: { + Title: "Adresa koncového bodu", + SubTitle: "Príklad:", + }, + + ApiVerion: { + Title: "Verzia API (gemini-pro verzia API)", + SubTitle: "Vyberte špecifickú verziu časti", + }, + }, + }, + + Model: "Model", + Temperature: { + Title: "Teplota", + SubTitle: "Vyššia hodnota robí výstup náhodnejším", + }, + TopP: { + Title: "Top P", + SubTitle: "Neupravujte túto hodnotu spolu s teplotou", + }, + MaxTokens: { + Title: "Maximálny počet tokenov", + SubTitle: "Maximálna dĺžka vstupných tokenov a generovaných tokenov", + }, + PresencePenalty: { + Title: "Penalizácia za prítomnosť", + SubTitle: + "Vyššia hodnota zvyšuje pravdepodobnosť hovorenia o nových témach", + }, + FrequencyPenalty: { + Title: "Penalizácia za frekvenciu", + SubTitle: + "Vyššia hodnota znižuje pravdepodobnosť opakovania rovnakej línie", + }, + }, + Store: { + DefaultTopic: "Nová konverzácia", + BotHello: "Ahoj! Ako vám dnes môžem pomôcť?", + Error: "Niečo sa pokazilo, skúste to prosím neskôr znova.", + Prompt: { + History: (content: string) => + "Toto je zhrnutie histórie chatu ako rekapitulácia: " + content, + Topic: + "Prosím, vygenerujte štvor- až päťslovný titul, ktorý zhrnie našu konverzáciu bez akéhokoľvek úvodu, interpunkcie, úvodzoviek, bodiek, symbolov, tučného textu alebo ďalšieho textu. Odstráňte uzatváracie úvodzovky.", + Summarize: + "Stručne zhrňte diskusiu na menej ako 200 slov, aby ste ju mohli použiť ako výzvu pre budúci kontext.", + }, + }, + Copy: { + Success: "Skopírované do schránky", + Failed: + "Kopírovanie zlyhalo, prosím udeľte povolenie na prístup k schránke", + }, + Download: { + Success: "Obsah stiahnutý do vášho adresára.", + Failed: "Stiahnutie zlyhalo.", + }, + Context: { + Toast: (x: any) => `S ${x} kontextovými výzvami`, + Edit: "Aktuálne nastavenia chatu", + Add: "Pridať výzvu", + Clear: "Kontext vyčistený", + Revert: "Vrátiť späť", + }, + Plugin: { + Name: "Plugin", + }, + FineTuned: { + Sysmessage: "Ste asistent, ktorý", + }, + Mask: { + Name: "Maska", + Page: { + Title: "Šablóna výziev", + SubTitle: (count: number) => `${count} šablón výziev`, + Search: "Hľadať šablóny", + Create: "Vytvoriť", + }, + Item: { + Info: (count: number) => `${count} výziev`, + Chat: "Chat", + View: "Zobraziť", + Edit: "Upraviť", + Delete: "Vymazať", + DeleteConfirm: "Potvrdiť vymazanie?", + }, + EditModal: { + Title: (readonly: boolean) => + `Upraviť šablónu výziev ${readonly ? "(iba na čítanie)" : ""}`, + Download: "Stiahnuť", + Clone: "Klonovať", + }, + Config: { + Avatar: "Avatar robota", + Name: "Meno robota", + Sync: { + Title: "Použiť globálne nastavenia", + SubTitle: "Použiť globálne nastavenia v tomto chate", + Confirm: "Potvrdiť prepísanie vlastného nastavenia globálnym?", + }, + HideContext: { + Title: "Skryť kontextové výzvy", + SubTitle: "Nezobrazovať kontextové výzvy v chate", + }, + Share: { + Title: "Zdieľať túto masku", + SubTitle: "Vygenerovať odkaz na túto masku", + Action: "Kopírovať odkaz", + }, + }, + }, + NewChat: { + Return: "Vrátiť sa", + Skip: "Len začať", + Title: "Vybrať masku", + SubTitle: "Chatovať s dušou za maskou", + More: "Nájsť viac", + NotShow: "Už nezobrazovať", + ConfirmNoShow: + "Potvrdiť deaktiváciu? Môžete ju neskôr znova povoliť v nastaveniach.", + }, + + UI: { + Confirm: "Potvrdiť", + Cancel: "Zrušiť", + Close: "Zavrieť", + Create: "Vytvoriť", + Edit: "Upraviť", + Export: "Exportovať", + Import: "Importovať", + Sync: "Synchronizovať", + Config: "Konfigurácia", + }, + Exporter: { + Description: { + Title: "Zobrazia sa len správy po vyčistení kontextu", + }, + Model: "Model", + Messages: "Správy", + Topic: "Téma", + Time: "Čas", + }, + + URLCommand: { + Code: "Zistený prístupový kód z URL, potvrdiť na aplikovanie?", + Settings: "Zistené nastavenia z URL, potvrdiť na aplikovanie?", + }, +}; + +export default sk; diff --git a/app/store/access.ts b/app/store/access.ts index 9e8024a6a..6884e71e3 100644 --- a/app/store/access.ts +++ b/app/store/access.ts @@ -12,7 +12,9 @@ import { ensure } from "../utils/clone"; let fetchState = 0; // 0 not fetch, 1 fetching, 2 done const DEFAULT_OPENAI_URL = - getClientConfig()?.buildMode === "export" ? DEFAULT_API_HOST : ApiPath.OpenAI; + getClientConfig()?.buildMode === "export" + ? DEFAULT_API_HOST + "/api/proxy/openai" + : ApiPath.OpenAI; const DEFAULT_ACCESS_STATE = { accessCode: "", diff --git a/app/store/chat.ts b/app/store/chat.ts index dff6b7bf1..037a6c960 100644 --- a/app/store/chat.ts +++ b/app/store/chat.ts @@ -6,6 +6,7 @@ import { ModelConfig, ModelType, useAppConfig } from "./config"; import { createEmptyMask, Mask } from "./mask"; import { DEFAULT_INPUT_TEMPLATE, + DEFAULT_MODELS, DEFAULT_SYSTEM_TEMPLATE, KnowledgeCutOffDate, ModelProvider, @@ -91,10 +92,21 @@ function countMessages(msgs: ChatMessage[]) { } function fillTemplateWith(input: string, modelConfig: ModelConfig) { - let cutoff = + const cutoff = KnowledgeCutOffDate[modelConfig.model] ?? KnowledgeCutOffDate.default; + // Find the model in the DEFAULT_MODELS array that matches the modelConfig.model + const modelInfo = DEFAULT_MODELS.find((m) => m.name === modelConfig.model); + + var serviceProvider = "OpenAI"; + if (modelInfo) { + // TODO: auto detect the providerName from the modelConfig.model + + // Directly use the providerName from the modelInfo + serviceProvider = modelInfo.provider.providerName; + } const vars = { + ServiceProvider: serviceProvider, cutoff, model: modelConfig.model, time: new Date().toLocaleString(), @@ -111,7 +123,8 @@ function fillTemplateWith(input: string, modelConfig: ModelConfig) { } Object.entries(vars).forEach(([name, value]) => { - output = output.replaceAll(`{{${name}}}`, value); + const regex = new RegExp(`{{${name}}}`, "g"); + output = output.replace(regex, value.toString()); // Ensure value is a string }); return output; @@ -303,7 +316,7 @@ export const useChatStore = createPersistStore( }); var api: ClientApi; - if (modelConfig.model === "gemini-pro") { + if (modelConfig.model.startsWith("gemini")) { api = new ClientApi(ModelProvider.GeminiPro); } else { api = new ClientApi(ModelProvider.GPT); @@ -488,7 +501,7 @@ export const useChatStore = createPersistStore( const modelConfig = session.mask.modelConfig; var api: ClientApi; - if (modelConfig.model === "gemini-pro") { + if (modelConfig.model.startsWith("gemini")) { api = new ClientApi(ModelProvider.GeminiPro); } else { api = new ClientApi(ModelProvider.GPT); diff --git a/app/store/config.ts b/app/store/config.ts index 057e31b25..20bf664df 100644 --- a/app/store/config.ts +++ b/app/store/config.ts @@ -28,7 +28,7 @@ export enum Theme { export const DEFAULT_CONFIG = { lastUpdate: Date.now(), // timestamp, to merge state - submitKey: isMacOS() ? SubmitKey.MetaEnter : SubmitKey.CtrlEnter, + submitKey: SubmitKey.Enter, avatar: "1f603", fontSize: 14, theme: Theme.Auto as Theme, diff --git a/app/store/sync.ts b/app/store/sync.ts index b74f6895f..5ff1cc6e5 100644 --- a/app/store/sync.ts +++ b/app/store/sync.ts @@ -48,7 +48,7 @@ const DEFAULT_SYNC_STATE = { export const useSyncStore = createPersistStore( DEFAULT_SYNC_STATE, (set, get) => ({ - coundSync() { + cloudSync() { const config = get()[get().provider]; return Object.values(config).every((c) => c.toString().length > 0); }, @@ -60,8 +60,10 @@ export const useSyncStore = createPersistStore( export() { const state = getLocalAppState(); const datePart = isApp - ? `${new Date().toLocaleDateString().replace(/\//g, '_')} ${new Date().toLocaleTimeString().replace(/:/g, '_')}` - : new Date().toLocaleString(); + ? `${new Date().toLocaleDateString().replace(/\//g, "_")} ${new Date() + .toLocaleTimeString() + .replace(/:/g, "_")}` + : new Date().toLocaleString(); const fileName = `Backup-${datePart}.json`; downloadAs(JSON.stringify(state), fileName); diff --git a/app/utils/cors.ts b/app/utils/cors.ts index 773f152aa..20b3e5160 100644 --- a/app/utils/cors.ts +++ b/app/utils/cors.ts @@ -1,8 +1,8 @@ import { getClientConfig } from "../config/client"; -import { ApiPath, DEFAULT_CORS_HOST } from "../constant"; +import { ApiPath, DEFAULT_API_HOST } from "../constant"; export function corsPath(path: string) { - const baseUrl = getClientConfig()?.isApp ? `${DEFAULT_CORS_HOST}` : ""; + const baseUrl = getClientConfig()?.isApp ? `${DEFAULT_API_HOST}` : ""; if (!path.startsWith("/")) { path = "/" + path; diff --git a/docs/images/head-cover.png b/docs/images/head-cover.png index 859d83b05..7fd4aeb58 100644 Binary files a/docs/images/head-cover.png and b/docs/images/head-cover.png differ diff --git a/docs/images/upstash-1.png b/docs/images/upstash-1.png index 5813c521f..253ee60c1 100644 Binary files a/docs/images/upstash-1.png and b/docs/images/upstash-1.png differ diff --git a/docs/images/upstash-2.png b/docs/images/upstash-2.png index 91078642d..d1f255d6b 100644 Binary files a/docs/images/upstash-2.png and b/docs/images/upstash-2.png differ diff --git a/docs/images/upstash-3.png b/docs/images/upstash-3.png index 06c53d190..5b2109409 100644 Binary files a/docs/images/upstash-3.png and b/docs/images/upstash-3.png differ diff --git a/docs/images/upstash-4.png b/docs/images/upstash-4.png index ae301c4d3..a22ccc99a 100644 Binary files a/docs/images/upstash-4.png and b/docs/images/upstash-4.png differ diff --git a/docs/images/upstash-5.png b/docs/images/upstash-5.png index 728a37460..57f8b4f95 100644 Binary files a/docs/images/upstash-5.png and b/docs/images/upstash-5.png differ diff --git a/docs/images/upstash-6.png b/docs/images/upstash-6.png index 0991c89cf..75770760c 100644 Binary files a/docs/images/upstash-6.png and b/docs/images/upstash-6.png differ diff --git a/docs/images/upstash-7.png b/docs/images/upstash-7.png index 3b3408537..76fd0ea86 100644 Binary files a/docs/images/upstash-7.png and b/docs/images/upstash-7.png differ diff --git a/next.config.mjs b/next.config.mjs index 4faa63e54..ae94f4895 100644 --- a/next.config.mjs +++ b/next.config.mjs @@ -64,8 +64,17 @@ if (mode !== "export") { nextConfig.rewrites = async () => { const ret = [ + // adjust for previous verison directly using "/api/proxy/" as proxy base route { - source: "/api/proxy/:path*", + source: "/api/proxy/v1/:path*", + destination: "https://api.openai.com/v1/:path*", + }, + { + source: "/api/proxy/google/:path*", + destination: "https://generativelanguage.googleapis.com/:path*", + }, + { + source: "/api/proxy/openai/:path*", destination: "https://api.openai.com/:path*", }, { diff --git a/package.json b/package.json index a014c7bfe..b31d6a901 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "chatgpt-next-web", + "name": "nextchat", "private": false, "license": "mit", "scripts": { @@ -18,6 +18,7 @@ "dependencies": { "@fortaine/fetch-event-source": "^3.0.6", "@hello-pangea/dnd": "^16.5.0", + "@next/third-parties": "^14.1.0", "@svgr/webpack": "^6.5.1", "@vercel/analytics": "^0.1.11", "@vercel/speed-insights": "^1.0.2", @@ -63,4 +64,4 @@ "resolutions": { "lint-staged/yaml": "^2.2.2" } -} +} \ No newline at end of file diff --git a/public/android-chrome-192x192.png b/public/android-chrome-192x192.png index b191a58ac..797a7d86a 100644 Binary files a/public/android-chrome-192x192.png and b/public/android-chrome-192x192.png differ diff --git a/public/android-chrome-512x512.png b/public/android-chrome-512x512.png index c7e52c394..c0265ef4f 100644 Binary files a/public/android-chrome-512x512.png and b/public/android-chrome-512x512.png differ diff --git a/public/apple-touch-icon.png b/public/apple-touch-icon.png index b0da95315..a76212ae0 100644 Binary files a/public/apple-touch-icon.png and b/public/apple-touch-icon.png differ diff --git a/public/favicon-32x32.png b/public/favicon-32x32.png index 2fee10dfb..c464762ea 100644 Binary files a/public/favicon-32x32.png and b/public/favicon-32x32.png differ diff --git a/public/macos.png b/public/macos.png index 2eb110707..4ca110e37 100644 Binary files a/public/macos.png and b/public/macos.png differ diff --git a/scripts/delete-deployment-preview.sh b/scripts/delete-deployment-preview.sh new file mode 100755 index 000000000..4f2bb3495 --- /dev/null +++ b/scripts/delete-deployment-preview.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Set the pipefail option. +set -o pipefail + +# Get the Vercel API endpoints. +GET_DEPLOYMENTS_ENDPOINT="https://api.vercel.com/v6/deployments" +DELETE_DEPLOYMENTS_ENDPOINT="https://api.vercel.com/v13/deployments" + +# Create a list of deployments. +deployments=$(curl -s -X GET "$GET_DEPLOYMENTS_ENDPOINT/?projectId=$VERCEL_PROJECT_ID&teamId=$VERCEL_ORG_ID" -H "Authorization: Bearer $VERCEL_TOKEN ") +#deployments=$(curl -s -X GET "$GET_DEPLOYMENTS_ENDPOINT/?projectId=$VERCEL_PROJECT_ID" -H "Authorization: Bearer $VERCEL_TOKEN ") + +# Filter the deployments list by meta.base_hash === meta tag. +filtered_deployments=$(echo -E $deployments | jq --arg META_TAG "$META_TAG" '[.deployments[] | select(.meta.base_hash | type == "string" and contains($META_TAG)) | .uid] | join(",")') +filtered_deployments="${filtered_deployments//\"/}" # Remove double quotes + +# Clears the values from filtered_deployments +IFS=',' read -ra values <<<"$filtered_deployments" + +echo "META_TAG ${META_TAG}" +echo "Filtered deployments ${filtered_deployments}" + +# Iterate over the filtered deployments list. +for uid in "${values[@]}"; do + echo "Deleting ${uid}" + + delete_url="${DELETE_DEPLOYMENTS_ENDPOINT}/${uid}?teamId=${VERCEL_ORG_ID}" + echo $delete_url + + # Make DELETE a request to the /v13/deployments/{id} endpoint. + curl -X DELETE $delete_url -H "Authorization: Bearer $VERCEL_TOKEN" + + echo "Deleted!" +done diff --git a/scripts/setup.sh b/scripts/setup.sh index 73ed61b13..50488f963 100644 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -54,7 +54,7 @@ if ! command -v node >/dev/null || ! command -v git >/dev/null || ! command -v y fi # Clone the repository and install dependencies -git clone https://github.com/Yidadaa/ChatGPT-Next-Web +git clone https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web cd ChatGPT-Next-Web yarn install diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index d93210fc5..47d12e119 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -56,6 +56,25 @@ version = "1.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c7d0618f0e0b7e8ff11427422b64564d5fb0be1940354bfe2e0529b18a9d9b8" +[[package]] +name = "arboard" +version = "3.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aafb29b107435aa276664c1db8954ac27a6e105cdad3c88287a199eb0e313c08" +dependencies = [ + "clipboard-win", + "core-graphics", + "image", + "log", + "objc", + "objc-foundation", + "objc_id", + "parking_lot", + "thiserror", + "winapi", + "x11rb", +] + [[package]] name = "async-broadcast" version = "0.5.1" @@ -208,22 +227,6 @@ version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" -[[package]] -name = "attohttpc" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fcf00bc6d5abb29b5f97e3c61a90b6d3caa12f3faf897d4a3e3607c050a35a7" -dependencies = [ - "flate2", - "http", - "log", - "native-tls", - "serde", - "serde_json", - "serde_urlencoded", - "url", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -348,6 +351,9 @@ name = "bytes" version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +dependencies = [ + "serde", +] [[package]] name = "cairo-rs" @@ -431,17 +437,6 @@ version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" -[[package]] -name = "chatgpt-next-web" -version = "0.1.0" -dependencies = [ - "serde", - "serde_json", - "tauri", - "tauri-build", - "tauri-plugin-window-state", -] - [[package]] name = "chrono" version = "0.4.24" @@ -455,6 +450,17 @@ dependencies = [ "winapi", ] +[[package]] +name = "clipboard-win" +version = "4.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7191c27c2357d9b7ef96baac1773290d4ca63b24205b82a3fd8a0637afcf0362" +dependencies = [ + "error-code", + "str-buf", + "winapi", +] + [[package]] name = "cocoa" version = "0.24.1" @@ -634,12 +640,12 @@ dependencies = [ [[package]] name = "ctor" -version = "0.1.26" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d2301688392eb071b0bf1a37be05c469d3cc4dbbd95df672fe28ab021e6a096" +checksum = "30d2b3721e861707777e3195b0158f950ae6dc4a27e4d02ff9f67e3eb3de199e" dependencies = [ "quote", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] @@ -775,7 +781,7 @@ dependencies = [ "rustc_version", "toml 0.7.3", "vswhom", - "winreg", + "winreg 0.11.0", ] [[package]] @@ -814,6 +820,12 @@ dependencies = [ "syn 2.0.16", ] +[[package]] +name = "equivalent" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" + [[package]] name = "errno" version = "0.3.1" @@ -835,6 +847,16 @@ dependencies = [ "libc", ] +[[package]] +name = "error-code" +version = "2.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64f18991e7bf11e7ffee451b5318b5c1a73c52d0d0ada6e5a3017c8c1ced6a21" +dependencies = [ + "libc", + "str-buf", +] + [[package]] name = "event-listener" version = "2.5.3" @@ -1142,6 +1164,16 @@ dependencies = [ "version_check", ] +[[package]] +name = "gethostname" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb65d4ba3173c56a500b555b532f72c42e8d1fe64962b518897f8959fae2c177" +dependencies = [ + "libc", + "winapi", +] + [[package]] name = "getrandom" version = "0.1.16" @@ -1324,12 +1356,37 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "h2" +version = "0.3.24" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" +dependencies = [ + "bytes", + "fnv", + "futures-core", + "futures-sink", + "futures-util", + "http", + "indexmap 2.2.2", + "slab", + "tokio", + "tokio-util", + "tracing", +] + [[package]] name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" +[[package]] +name = "hashbrown" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" + [[package]] name = "heck" version = "0.3.3" @@ -1368,9 +1425,9 @@ checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" [[package]] name = "html5ever" -version = "0.25.2" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5c13fb08e5d4dfc151ee5e88bae63f7773d61852f3bdc73c9f4b9e1bde03148" +checksum = "bea68cab48b8459f17cf1c944c67ddc572d272d9f2b274140f223ecb1da4a3b7" dependencies = [ "log", "mac", @@ -1391,12 +1448,72 @@ dependencies = [ "itoa 1.0.6", ] +[[package]] +name = "http-body" +version = "0.4.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" +dependencies = [ + "bytes", + "http", + "pin-project-lite", +] + [[package]] name = "http-range" version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "21dec9db110f5f872ed9699c3ecf50cf16f423502706ba5c72462e28d3157573" +[[package]] +name = "httparse" +version = "1.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" + +[[package]] +name = "httpdate" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" + +[[package]] +name = "hyper" +version = "0.14.28" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" +dependencies = [ + "bytes", + "futures-channel", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "httparse", + "httpdate", + "itoa 1.0.6", + "pin-project-lite", + "socket2", + "tokio", + "tower-service", + "tracing", + "want", +] + +[[package]] +name = "hyper-tls" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" +dependencies = [ + "bytes", + "hyper", + "native-tls", + "tokio", + "tokio-native-tls", +] + [[package]] name = "iana-time-zone" version = "0.1.56" @@ -1475,6 +1592,8 @@ dependencies = [ "color_quant", "num-rational", "num-traits", + "png", + "tiff", ] [[package]] @@ -1484,15 +1603,26 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" dependencies = [ "autocfg", - "hashbrown", + "hashbrown 0.12.3", + "serde", +] + +[[package]] +name = "indexmap" +version = "2.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824b2ae422412366ba479e8111fd301f7b5faece8149317bb81925979a53f520" +dependencies = [ + "equivalent", + "hashbrown 0.14.3", "serde", ] [[package]] name = "infer" -version = "0.12.0" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a898e4b7951673fce96614ce5751d13c40fc5674bc2d759288e46c3ab62598b3" +checksum = "f551f8c3a39f68f986517db0d1759de85881894fdc7db798bd2a9df9cb04b7fc" dependencies = [ "cfb", ] @@ -1517,6 +1647,12 @@ dependencies = [ "windows-sys 0.48.0", ] +[[package]] +name = "ipnet" +version = "2.9.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" + [[package]] name = "itoa" version = "0.4.8" @@ -1572,6 +1708,12 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8eaf4bc02d17cbdd7ff4c7438cafcdf7fb9a4613313ad11b4f8fefe7d3fa0130" +[[package]] +name = "jpeg-decoder" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f5d4a7da358eff58addd2877a45865158f0d78c911d43a5784ceb7bbf52833b0" + [[package]] name = "js-sys" version = "0.3.63" @@ -1583,9 +1725,9 @@ dependencies = [ [[package]] name = "json-patch" -version = "1.0.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f54898088ccb91df1b492cc80029a6fdf1c48ca0db7c6822a8babad69c94658" +checksum = "55ff1e1486799e3f64129f8ccad108b38290df9cd7015cd31bed17239f0789d6" dependencies = [ "serde", "serde_json", @@ -1594,13 +1736,14 @@ dependencies = [ ] [[package]] -name = "kuchiki" -version = "0.8.1" +name = "kuchikiki" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ea8e9c6e031377cff82ee3001dc8026cdf431ed4e2e6b51f98ab8c73484a358" +checksum = "f29e4755b7b995046f510a7520c42b2fed58b77bd94d5a87a8eb43d2fd126da8" dependencies = [ "cssparser", "html5ever", + "indexmap 1.9.3", "matches", "selectors", ] @@ -1644,12 +1787,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.17" +version = "0.4.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" -dependencies = [ - "cfg-if", -] +checksum = "b5e6163cb8c49088c2c36f57875e58ccd8c87c7427f7fbd50ea6710b2f3f2e8f" [[package]] name = "loom" @@ -1696,13 +1836,13 @@ dependencies = [ [[package]] name = "markup5ever" -version = "0.10.1" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a24f40fb03852d1cdd84330cddcaf98e9ec08a7b7768e952fad3b4cf048ec8fd" +checksum = "7a2629bb1404f3d34c2e921f21fd34ba00b206124c81f65c50b43b6aaefeb016" dependencies = [ "log", - "phf 0.8.0", - "phf_codegen", + "phf 0.10.1", + "phf_codegen 0.10.0", "string_cache", "string_cache_codegen", "tendril", @@ -1756,6 +1896,12 @@ dependencies = [ "autocfg", ] +[[package]] +name = "mime" +version = "0.3.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" + [[package]] name = "minisign-verify" version = "0.2.1" @@ -1772,6 +1918,18 @@ dependencies = [ "simd-adler32", ] +[[package]] +name = "mio" +version = "0.8.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2" +dependencies = [ + "libc", + "log", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.48.0", +] + [[package]] name = "native-tls" version = "0.2.11" @@ -1824,6 +1982,17 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e4a24736216ec316047a1fc4252e27dabb04218aa4a3f37c6e7ddbf1f9782b54" +[[package]] +name = "nextchat" +version = "0.1.0" +dependencies = [ + "serde", + "serde_json", + "tauri", + "tauri-build", + "tauri-plugin-window-state", +] + [[package]] name = "nix" version = "0.26.4" @@ -2133,9 +2302,17 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fabbf1ead8a5bcbc20f5f8b939ee3f5b0f6f281b6ad3468b84656b658b455259" dependencies = [ - "phf_macros 0.10.0", "phf_shared 0.10.0", - "proc-macro-hack", +] + +[[package]] +name = "phf" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" +dependencies = [ + "phf_macros 0.11.2", + "phf_shared 0.11.2", ] [[package]] @@ -2148,6 +2325,16 @@ dependencies = [ "phf_shared 0.8.0", ] +[[package]] +name = "phf_codegen" +version = "0.10.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4fb1c3a8bc4dd4e5cfce29b44ffc14bedd2ee294559a294e2a4d4c9e9a6a13cd" +dependencies = [ + "phf_generator 0.10.0", + "phf_shared 0.10.0", +] + [[package]] name = "phf_generator" version = "0.8.0" @@ -2168,6 +2355,16 @@ dependencies = [ "rand 0.8.5", ] +[[package]] +name = "phf_generator" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" +dependencies = [ + "phf_shared 0.11.2", + "rand 0.8.5", +] + [[package]] name = "phf_macros" version = "0.8.0" @@ -2184,16 +2381,15 @@ dependencies = [ [[package]] name = "phf_macros" -version = "0.10.0" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58fdf3184dd560f160dd73922bea2d5cd6e8f064bf4b13110abd81b03697b4e0" +checksum = "3444646e286606587e49f3bcf1679b8cef1dc2c5ecc29ddacaffc305180d464b" dependencies = [ - "phf_generator 0.10.0", - "phf_shared 0.10.0", - "proc-macro-hack", + "phf_generator 0.11.2", + "phf_shared 0.11.2", "proc-macro2", "quote", - "syn 1.0.109", + "syn 2.0.16", ] [[package]] @@ -2214,6 +2410,15 @@ dependencies = [ "siphasher", ] +[[package]] +name = "phf_shared" +version = "0.11.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" +dependencies = [ + "siphasher", +] + [[package]] name = "pin-project-lite" version = "0.2.9" @@ -2250,7 +2455,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bd9647b268a3d3e14ff09c23201133a62589c658db02bb7388c7246aafe0590" dependencies = [ "base64 0.21.0", - "indexmap", + "indexmap 1.9.3", "line-wrap", "quick-xml 0.28.2", "serde", @@ -2525,6 +2730,46 @@ version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a5996294f19bd3aae0453a862ad728f60e6600695733dd5df01da90c54363a3c" +[[package]] +name = "reqwest" +version = "0.11.23" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "37b1ae8d9ac08420c66222fb9096fc5de435c3c48542bc5336c51892cffafb41" +dependencies = [ + "base64 0.21.0", + "bytes", + "encoding_rs", + "futures-core", + "futures-util", + "h2", + "http", + "http-body", + "hyper", + "hyper-tls", + "ipnet", + "js-sys", + "log", + "mime", + "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", + "serde", + "serde_json", + "serde_urlencoded", + "system-configuration", + "tokio", + "tokio-native-tls", + "tokio-util", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "wasm-streams", + "web-sys", + "winreg 0.50.0", +] + [[package]] name = "rfd" version = "0.10.0" @@ -2656,7 +2901,7 @@ dependencies = [ "log", "matches", "phf 0.8.0", - "phf_codegen", + "phf_codegen 0.8.0", "precomputed-hash", "servo_arc", "smallvec", @@ -2737,14 +2982,15 @@ dependencies = [ [[package]] name = "serde_with" -version = "2.3.3" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" +checksum = "1b0ed1662c5a68664f45b76d18deb0e234aff37207086803165c961eb695e981" dependencies = [ - "base64 0.13.1", + "base64 0.21.0", "chrono", "hex", - "indexmap", + "indexmap 1.9.3", + "indexmap 2.2.2", "serde", "serde_json", "serde_with_macros", @@ -2753,9 +2999,9 @@ dependencies = [ [[package]] name = "serde_with_macros" -version = "2.3.3" +version = "3.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" +checksum = "568577ff0ef47b879f736cd66740e022f3672788cdf002a05a4e609ea5a6fb15" dependencies = [ "darling", "proc-macro2", @@ -2931,6 +3177,12 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" +[[package]] +name = "str-buf" +version = "1.0.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e08d8363704e6c71fc928674353e6b7c23dcea9d82d7012c8faf2a3a025f8d0" + [[package]] name = "string_cache" version = "0.8.7" @@ -2985,6 +3237,27 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "system-configuration" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "system-configuration-sys", +] + +[[package]] +name = "system-configuration-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "system-deps" version = "5.0.0" @@ -3088,13 +3361,13 @@ checksum = "fd1ba337640d60c3e96bc6f0638a939b9c9a7f2c316a1598c279828b3d1dc8c5" [[package]] name = "tauri" -version = "1.3.0" +version = "1.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d42ba3a2e8556722f31336a0750c10dbb6a81396a1c452977f515da83f69f842" +checksum = "fd27c04b9543776a972c86ccf70660b517ecabbeced9fb58d8b961a13ad129af" dependencies = [ "anyhow", - "attohttpc", "base64 0.21.0", + "bytes", "cocoa", "dirs-next", "embed_plist", @@ -3116,6 +3389,7 @@ dependencies = [ "rand 0.8.5", "raw-window-handle", "regex", + "reqwest", "rfd", "semver", "serde", @@ -3142,12 +3416,13 @@ dependencies = [ [[package]] name = "tauri-build" -version = "1.3.0" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "929b3bd1248afc07b63e33a6a53c3f82c32d0b0a5e216e4530e94c467e019389" +checksum = "e9914a4715e0b75d9f387a285c7e26b5bbfeb1249ad9f842675a82481565c532" dependencies = [ "anyhow", "cargo_toml", + "dirs-next", "heck 0.4.1", "json-patch", "semver", @@ -3155,14 +3430,14 @@ dependencies = [ "serde_json", "tauri-utils", "tauri-winres", - "winnow", + "walkdir", ] [[package]] name = "tauri-codegen" -version = "1.3.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5a2105f807c6f50b2fa2ce5abd62ef207bc6f14c9fcc6b8caec437f6fb13bde" +checksum = "a1554c5857f65dbc377cefb6b97c8ac77b1cb2a90d30d3448114d5d6b48a77fc" dependencies = [ "base64 0.21.0", "brotli", @@ -3186,9 +3461,9 @@ dependencies = [ [[package]] name = "tauri-macros" -version = "1.3.0" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8784cfe6f5444097e93c69107d1ac5e8f13d02850efa8d8f2a40fe79674cef46" +checksum = "277abf361a3a6993ec16bcbb179de0d6518009b851090a01adfea12ac89fa875" dependencies = [ "heck 0.4.1", "proc-macro2", @@ -3214,9 +3489,9 @@ dependencies = [ [[package]] name = "tauri-runtime" -version = "0.13.0" +version = "0.14.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3b80ea3fcd5fefb60739a3b577b277e8fc30434538a2f5bba82ad7d4368c422" +checksum = "cf2d0652aa2891ff3e9caa2401405257ea29ab8372cce01f186a5825f1bd0e76" dependencies = [ "gtk", "http", @@ -3235,10 +3510,11 @@ dependencies = [ [[package]] name = "tauri-runtime-wry" -version = "0.13.0" +version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d1c396950b1ba06aee1b4ffe6c7cd305ff433ca0e30acbc5fa1a2f92a4ce70f1" +checksum = "6cae61fbc731f690a4899681c9052dde6d05b159b44563ace8186fc1bfb7d158" dependencies = [ + "arboard", "cocoa", "gtk", "percent-encoding", @@ -3255,20 +3531,22 @@ dependencies = [ [[package]] name = "tauri-utils" -version = "1.3.0" +version = "1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6f9c2dafef5cbcf52926af57ce9561bd33bb41d7394f8bb849c0330260d864" +checksum = "ece74810b1d3d44f29f732a7ae09a63183d63949bbdd59c61f8ed2a1b70150db" dependencies = [ "brotli", "ctor", + "dunce", "glob", "heck 0.4.1", "html5ever", "infer", "json-patch", - "kuchiki", + "kuchikiki", + "log", "memchr", - "phf 0.10.1", + "phf 0.11.2", "proc-macro2", "quote", "semver", @@ -3278,7 +3556,7 @@ dependencies = [ "thiserror", "url", "walkdir", - "windows 0.39.0", + "windows-version", ] [[package]] @@ -3361,6 +3639,17 @@ dependencies = [ "once_cell", ] +[[package]] +name = "tiff" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7449334f9ff2baf290d55d73983a7d6fa15e01198faef72af07e2a8db851e471" +dependencies = [ + "flate2", + "jpeg-decoder", + "weezl", +] + [[package]] name = "time" version = "0.3.15" @@ -3396,11 +3685,38 @@ checksum = "0aa32867d44e6f2ce3385e89dceb990188b8bb0fb25b0cf576647a6f98ac5105" dependencies = [ "autocfg", "bytes", + "libc", + "mio", "num_cpus", "pin-project-lite", + "socket2", "windows-sys 0.48.0", ] +[[package]] +name = "tokio-native-tls" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbae76ab933c85776efabc971569dd6119c580d8f5d448769dec1764bf796ef2" +dependencies = [ + "native-tls", + "tokio", +] + +[[package]] +name = "tokio-util" +version = "0.7.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" +dependencies = [ + "bytes", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", +] + [[package]] name = "toml" version = "0.5.11" @@ -3437,13 +3753,19 @@ version = "0.19.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "239410c8609e8125456927e6707163a3b1fdb40561e4b803bc041f466ccfdc13" dependencies = [ - "indexmap", + "indexmap 1.9.3", "serde", "serde_spanned", "toml_datetime", "winnow", ] +[[package]] +name = "tower-service" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" + [[package]] name = "tracing" version = "0.1.37" @@ -3515,6 +3837,12 @@ dependencies = [ "serde_json", ] +[[package]] +name = "try-lock" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" + [[package]] name = "typenum" version = "1.16.0" @@ -3652,6 +3980,15 @@ dependencies = [ "winapi-util", ] +[[package]] +name = "want" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" +dependencies = [ + "try-lock", +] + [[package]] name = "wasi" version = "0.9.0+wasi-snapshot-preview1" @@ -3730,6 +4067,19 @@ version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ed9d5b4305409d1fc9482fee2d7f9bcbf24b3972bf59817ef757e23982242a93" +[[package]] +name = "wasm-streams" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4609d447824375f43e1ffbc051b50ad8f4b3ae8219680c94452ea05eb240ac7" +dependencies = [ + "futures-util", + "js-sys", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", +] + [[package]] name = "web-sys" version = "0.3.63" @@ -3825,6 +4175,12 @@ dependencies = [ "windows-metadata", ] +[[package]] +name = "weezl" +version = "0.1.8" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53a85b86a771b1c87058196170769dd264f66c0782acf1ae6cc51bfd64b39082" + [[package]] name = "winapi" version = "0.3.9" @@ -3850,6 +4206,15 @@ dependencies = [ "winapi", ] +[[package]] +name = "winapi-wsapoll" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c17110f57155602a80dca10be03852116403c9ff3cd25b079d666f2aa3df6e" +dependencies = [ + "winapi", +] + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -3981,12 +4346,36 @@ dependencies = [ "windows_x86_64_msvc 0.48.0", ] +[[package]] +name = "windows-targets" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a18201040b24831fbb9e4eb208f8892e1f50a37feb53cc7ff887feb8f50e7cd" +dependencies = [ + "windows_aarch64_gnullvm 0.52.0", + "windows_aarch64_msvc 0.52.0", + "windows_i686_gnu 0.52.0", + "windows_i686_msvc 0.52.0", + "windows_x86_64_gnu 0.52.0", + "windows_x86_64_gnullvm 0.52.0", + "windows_x86_64_msvc 0.52.0", +] + [[package]] name = "windows-tokens" version = "0.39.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f838de2fe15fe6bac988e74b798f26499a8b21a9d97edec321e79b28d1d7f597" +[[package]] +name = "windows-version" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "75aa004c988e080ad34aff5739c39d0312f4684699d6d71fc8a198d057b8b9b4" +dependencies = [ + "windows-targets 0.52.0", +] + [[package]] name = "windows_aarch64_gnullvm" version = "0.42.2" @@ -3999,6 +4388,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91ae572e1b79dba883e0d315474df7305d12f569b400fcf90581b06062f7e1bc" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cb7764e35d4db8a7921e09562a0304bf2f93e0a51bfccee0bd0bb0b666b015ea" + [[package]] name = "windows_aarch64_msvc" version = "0.37.0" @@ -4023,6 +4418,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b2ef27e0d7bdfcfc7b868b317c1d32c641a6fe4629c171b8928c7b08d98d7cf3" +[[package]] +name = "windows_aarch64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bbaa0368d4f1d2aaefc55b6fcfee13f41544ddf36801e793edbbfd7d7df075ef" + [[package]] name = "windows_i686_gnu" version = "0.37.0" @@ -4047,6 +4448,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622a1962a7db830d6fd0a69683c80a18fda201879f0f447f065a3b7467daa241" +[[package]] +name = "windows_i686_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a28637cb1fa3560a16915793afb20081aba2c92ee8af57b4d5f28e4b3e7df313" + [[package]] name = "windows_i686_msvc" version = "0.37.0" @@ -4071,6 +4478,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4542c6e364ce21bf45d69fdd2a8e455fa38d316158cfd43b3ac1c5b1b19f8e00" +[[package]] +name = "windows_i686_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ffe5e8e31046ce6230cc7215707b816e339ff4d4d67c65dffa206fd0f7aa7b9a" + [[package]] name = "windows_x86_64_gnu" version = "0.37.0" @@ -4095,6 +4508,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca2b8a661f7628cbd23440e50b05d705db3686f894fc9580820623656af974b1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d6fa32db2bc4a2f5abeacf2b69f7992cd09dca97498da74a151a3132c26befd" + [[package]] name = "windows_x86_64_gnullvm" version = "0.42.2" @@ -4107,6 +4526,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7896dbc1f41e08872e9d5e8f8baa8fdd2677f29468c4e156210174edc7f7b953" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a657e1e9d3f514745a572a6846d3c7aa7dbe1658c056ed9c3344c4109a6949e" + [[package]] name = "windows_x86_64_msvc" version = "0.37.0" @@ -4131,6 +4556,12 @@ version = "0.48.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1a515f5799fe4961cb532f983ce2b23082366b898e52ffbce459c86f67c8378a" +[[package]] +name = "windows_x86_64_msvc" +version = "0.52.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dff9641d1cd4be8d1a070daf9e3773c5f67e78b4d9d42263020c057706765c04" + [[package]] name = "winnow" version = "0.4.1" @@ -4151,10 +4582,20 @@ dependencies = [ ] [[package]] -name = "wry" -version = "0.24.3" +name = "winreg" +version = "0.50.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33748f35413c8a98d45f7a08832d848c0c5915501803d1faade5a4ebcd258cea" +checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" +dependencies = [ + "cfg-if", + "windows-sys 0.48.0", +] + +[[package]] +name = "wry" +version = "0.24.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6ad85d0e067359e409fcb88903c3eac817c392e5d638258abfb3da5ad8ba6fc4" dependencies = [ "base64 0.13.1", "block", @@ -4168,7 +4609,7 @@ dependencies = [ "gtk", "html5ever", "http", - "kuchiki", + "kuchikiki", "libc", "log", "objc", @@ -4209,6 +4650,28 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "x11rb" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1641b26d4dec61337c35a1b1aaf9e3cba8f46f0b43636c609ab0291a648040a" +dependencies = [ + "gethostname", + "nix", + "winapi", + "winapi-wsapoll", + "x11rb-protocol", +] + +[[package]] +name = "x11rb-protocol" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82d6c3f9a0fb6701fab8f6cea9b0c0bd5d6876f1f89f7fada07e558077c344bc" +dependencies = [ + "nix", +] + [[package]] name = "xattr" version = "0.2.3" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index fee1c860f..e08925902 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,27 +1,45 @@ [package] -name = "chatgpt-next-web" +name = "nextchat" version = "0.1.0" description = "A cross platform app for LLM ChatBot." authors = ["Yidadaa"] license = "mit" repository = "" -default-run = "chatgpt-next-web" +default-run = "nextchat" edition = "2021" rust-version = "1.60" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [build-dependencies] -tauri-build = { version = "1.3.0", features = [] } +tauri-build = { version = "1.5.1", features = [] } [dependencies] serde_json = "1.0" serde = { version = "1.0", features = ["derive"] } -tauri = { version = "1.3.0", features = ["notification-all", "fs-all", "clipboard-all", "dialog-all", "shell-open", "updater", "window-close", "window-hide", "window-maximize", "window-minimize", "window-set-icon", "window-set-ignore-cursor-events", "window-set-resizable", "window-show", "window-start-dragging", "window-unmaximize", "window-unminimize"] } +tauri = { version = "1.5.4", features = [ + "notification-all", + "fs-all", + "clipboard-all", + "dialog-all", + "shell-open", + "updater", + "window-close", + "window-hide", + "window-maximize", + "window-minimize", + "window-set-icon", + "window-set-ignore-cursor-events", + "window-set-resizable", + "window-show", + "window-start-dragging", + "window-unmaximize", + "window-unminimize", +] } tauri-plugin-window-state = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" } [features] # this feature is used for production builds or when `devPath` points to the filesystem and the built-in dev server is disabled. # If you use cargo directly instead of tauri's cli you can use this feature flag to switch between tauri's `dev` and `build` modes. # DO NOT REMOVE!! -custom-protocol = [ "tauri/custom-protocol" ] +custom-protocol = ["tauri/custom-protocol"] diff --git a/src-tauri/icons/128x128.png b/src-tauri/icons/128x128.png index 7fee8db6e..445c65313 100644 Binary files a/src-tauri/icons/128x128.png and b/src-tauri/icons/128x128.png differ diff --git a/src-tauri/icons/128x128@2x.png b/src-tauri/icons/128x128@2x.png index 178761b6a..c1a51d41f 100644 Binary files a/src-tauri/icons/128x128@2x.png and b/src-tauri/icons/128x128@2x.png differ diff --git a/src-tauri/icons/32x32.png b/src-tauri/icons/32x32.png index 471cdbb65..e06e30c4c 100644 Binary files a/src-tauri/icons/32x32.png and b/src-tauri/icons/32x32.png differ diff --git a/src-tauri/icons/Square107x107Logo.png b/src-tauri/icons/Square107x107Logo.png index 241e101ba..103276290 100644 Binary files a/src-tauri/icons/Square107x107Logo.png and b/src-tauri/icons/Square107x107Logo.png differ diff --git a/src-tauri/icons/Square142x142Logo.png b/src-tauri/icons/Square142x142Logo.png index b27ce753d..fe38d9925 100644 Binary files a/src-tauri/icons/Square142x142Logo.png and b/src-tauri/icons/Square142x142Logo.png differ diff --git a/src-tauri/icons/Square150x150Logo.png b/src-tauri/icons/Square150x150Logo.png index d9d58df2d..78c1e0722 100644 Binary files a/src-tauri/icons/Square150x150Logo.png and b/src-tauri/icons/Square150x150Logo.png differ diff --git a/src-tauri/icons/Square284x284Logo.png b/src-tauri/icons/Square284x284Logo.png index 64dd15d81..a3b0afca3 100644 Binary files a/src-tauri/icons/Square284x284Logo.png and b/src-tauri/icons/Square284x284Logo.png differ diff --git a/src-tauri/icons/Square30x30Logo.png b/src-tauri/icons/Square30x30Logo.png index c585069db..9adabd622 100644 Binary files a/src-tauri/icons/Square30x30Logo.png and b/src-tauri/icons/Square30x30Logo.png differ diff --git a/src-tauri/icons/Square310x310Logo.png b/src-tauri/icons/Square310x310Logo.png index 70b0b5ddb..5d5eabec6 100644 Binary files a/src-tauri/icons/Square310x310Logo.png and b/src-tauri/icons/Square310x310Logo.png differ diff --git a/src-tauri/icons/Square44x44Logo.png b/src-tauri/icons/Square44x44Logo.png index 6657a9617..8e3b27816 100644 Binary files a/src-tauri/icons/Square44x44Logo.png and b/src-tauri/icons/Square44x44Logo.png differ diff --git a/src-tauri/icons/Square71x71Logo.png b/src-tauri/icons/Square71x71Logo.png index 865a99ed8..e8a2d095d 100644 Binary files a/src-tauri/icons/Square71x71Logo.png and b/src-tauri/icons/Square71x71Logo.png differ diff --git a/src-tauri/icons/Square89x89Logo.png b/src-tauri/icons/Square89x89Logo.png index 4be716430..77e9a8972 100644 Binary files a/src-tauri/icons/Square89x89Logo.png and b/src-tauri/icons/Square89x89Logo.png differ diff --git a/src-tauri/icons/StoreLogo.png b/src-tauri/icons/StoreLogo.png index 9791b7adb..0b98f3c57 100644 Binary files a/src-tauri/icons/StoreLogo.png and b/src-tauri/icons/StoreLogo.png differ diff --git a/src-tauri/icons/icon.icns b/src-tauri/icons/icon.icns index 7432486f7..131a0810a 100644 Binary files a/src-tauri/icons/icon.icns and b/src-tauri/icons/icon.icns differ diff --git a/src-tauri/icons/icon.ico b/src-tauri/icons/icon.ico index 59f1568ee..93e6e8af2 100644 Binary files a/src-tauri/icons/icon.ico and b/src-tauri/icons/icon.ico differ diff --git a/src-tauri/icons/icon.png b/src-tauri/icons/icon.png index 3ae7ae9bf..c0265ef4f 100644 Binary files a/src-tauri/icons/icon.png and b/src-tauri/icons/icon.png differ diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 75d6a0d0a..d88194020 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -9,7 +9,7 @@ }, "package": { "productName": "NextChat", - "version": "2.10.1" + "version": "2.10.3" }, "tauri": { "allowlist": { @@ -86,12 +86,13 @@ } }, "security": { - "csp": null + "csp": null, + "dangerousUseHttpScheme": true }, "updater": { "active": true, "endpoints": [ - "https://github.com/Yidadaa/ChatGPT-Next-Web/releases/latest/download/latest.json" + "https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web/releases/latest/download/latest.json" ], "dialog": false, "windows": { diff --git a/yarn.lock b/yarn.lock index bf07c27ee..db6da708b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1275,6 +1275,13 @@ resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-13.4.9.tgz#0c2758164cccd61bc5a1c6cd8284fe66173e4a2b" integrity sha512-QbT03FXRNdpuL+e9pLnu+XajZdm/TtIXVYY4lA9t+9l0fLZbHXDYEKitAqxrOj37o3Vx5ufxiRAniaIebYDCgw== +"@next/third-parties@^14.1.0": + version "14.1.0" + resolved "https://registry.yarnpkg.com/@next/third-parties/-/third-parties-14.1.0.tgz#d9604fff8880e05d3804d2cf7ab42eb5430aec69" + integrity sha512-f55SdvQ1WWxi4mb5QqtYQh5wRzbm1XaeP7s39DPn4ks3re+n9VlFccbMxBRHqkE62zAyIKmvkUB2cByT/gugGA== + dependencies: + third-party-capital "1.0.20" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -5780,6 +5787,11 @@ text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw== +third-party-capital@1.0.20: + version "1.0.20" + resolved "https://registry.yarnpkg.com/third-party-capital/-/third-party-capital-1.0.20.tgz#e218a929a35bf4d2245da9addb8ab978d2f41685" + integrity sha512-oB7yIimd8SuGptespDAZnNkzIz+NWaJCu2RMsbs4Wmp9zSDUM8Nhi3s2OOcqYuv3mN4hitXc8DVx+LyUmbUDiA== + through@^2.3.8: version "2.3.8" resolved "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5"