提交修改

This commit is contained in:
Jerry-Ubuntu 2025-06-01 18:15:14 +08:00
parent 3809375694
commit be3b838580
10 changed files with 50 additions and 128 deletions

View File

@ -239,7 +239,9 @@ export function Artifacts() {
shadow shadow
onClick={() => previewRef.current?.reload()} onClick={() => previewRef.current?.reload()}
/> />
<div className={styles["artifacts-title"]}>NextChat Artifacts</div> <div className={styles["artifacts-title"]}>
Agree AI Design Artifacts
</div>
<ArtifactsShareButton <ArtifactsShareButton
id={id} id={id}
getCode={() => code} getCode={() => code}

View File

@ -1,23 +1,16 @@
import styles from "./auth.module.scss"; import styles from "./auth.module.scss";
import { IconButton } from "./button"; import { IconButton } from "./button";
import { useState, useEffect } from "react"; import { useEffect } from "react";
import { useNavigate } from "react-router-dom"; import { useNavigate } from "react-router-dom";
import { Path, SAAS_CHAT_URL } from "../constant"; import { Path } from "../constant";
import { useAccessStore } from "../store"; import { useAccessStore } from "../store";
import Locale from "../locales"; import Locale from "../locales";
import Delete from "../icons/close.svg";
import Arrow from "../icons/arrow.svg";
import Logo from "../icons/logo.svg";
import { useMobileScreen } from "@/app/utils";
import BotIcon from "../icons/bot.svg"; import BotIcon from "../icons/bot.svg";
import { getClientConfig } from "../config/client"; import { getClientConfig } from "../config/client";
import { PasswordInput } from "./ui-lib"; import { PasswordInput } from "./ui-lib";
import LeftIcon from "@/app/icons/left.svg"; import LeftIcon from "@/app/icons/left.svg";
import { safeLocalStorage } from "@/app/utils"; import { safeLocalStorage } from "@/app/utils";
import {
trackSettingsPageGuideToCPaymentClick,
trackAuthorizationPageButtonToCPaymentClick,
} from "../utils/auth-settings-events";
import clsx from "clsx"; import clsx from "clsx";
const storage = safeLocalStorage(); const storage = safeLocalStorage();
@ -27,10 +20,7 @@ export function AuthPage() {
const accessStore = useAccessStore(); const accessStore = useAccessStore();
const goHome = () => navigate(Path.Home); const goHome = () => navigate(Path.Home);
const goChat = () => navigate(Path.Chat); const goChat = () => navigate(Path.Chat);
const goSaas = () => { // SaasStart function removed
trackAuthorizationPageButtonToCPaymentClick();
window.location.href = SAAS_CHAT_URL;
};
const resetAccessCode = () => { const resetAccessCode = () => {
accessStore.update((access) => { accessStore.update((access) => {
@ -48,7 +38,7 @@ export function AuthPage() {
return ( return (
<div className={styles["auth-page"]}> <div className={styles["auth-page"]}>
<TopBanner></TopBanner> {/* TopBanner removed */}
<div className={styles["auth-header"]}> <div className={styles["auth-header"]}>
<IconButton <IconButton
icon={<LeftIcon />} icon={<LeftIcon />}
@ -115,75 +105,10 @@ export function AuthPage() {
type="primary" type="primary"
onClick={goChat} onClick={goChat}
/> />
<IconButton {/* SaasTips button removed */}
text={Locale.Auth.SaasTips}
onClick={() => {
goSaas();
}}
/>
</div> </div>
</div> </div>
); );
} }
function TopBanner() { // TopBanner component removed
const [isHovered, setIsHovered] = useState(false);
const [isVisible, setIsVisible] = useState(true);
const isMobile = useMobileScreen();
useEffect(() => {
// 检查 localStorage 中是否有标记
const bannerDismissed = storage.getItem("bannerDismissed");
// 如果标记不存在,存储默认值并显示横幅
if (!bannerDismissed) {
storage.setItem("bannerDismissed", "false");
setIsVisible(true); // 显示横幅
} else if (bannerDismissed === "true") {
// 如果标记为 "true",则隐藏横幅
setIsVisible(false);
}
}, []);
const handleMouseEnter = () => {
setIsHovered(true);
};
const handleMouseLeave = () => {
setIsHovered(false);
};
const handleClose = () => {
setIsVisible(false);
storage.setItem("bannerDismissed", "true");
};
if (!isVisible) {
return null;
}
return (
<div
className={styles["top-banner"]}
onMouseEnter={handleMouseEnter}
onMouseLeave={handleMouseLeave}
>
<div className={clsx(styles["top-banner-inner"], "no-dark")}>
<Logo className={styles["top-banner-logo"]}></Logo>
<span>
{Locale.Auth.TopTips}
<a
href={SAAS_CHAT_URL}
rel="stylesheet"
onClick={() => {
trackSettingsPageGuideToCPaymentClick();
}}
>
{Locale.Settings.Access.SaasStart.ChatNow}
<Arrow style={{ marginLeft: "4px" }} />
</a>
</span>
</div>
{(isHovered || isMobile) && (
<Delete className={styles["top-banner-close"]} onClick={handleClose} />
)}
</div>
);
}

View File

@ -524,10 +524,8 @@ export function ImagePreviewer(props: {
</div> </div>
<div> <div>
<div className={styles["main-title"]}>NextChat</div> <div className={styles["main-title"]}>Agree AI Design</div>
<div className={styles["sub-title"]}> <div className={styles["sub-title"]}>blog.agree.host/ai</div>
github.com/ChatGPTNextWeb/ChatGPT-Next-Web
</div>
<div className={styles["icons"]}> <div className={styles["icons"]}>
<MaskAvatar avatar={config.avatar} /> <MaskAvatar avatar={config.avatar} />
<span className={styles["icon-space"]}>&</span> <span className={styles["icon-space"]}>&</span>

View File

@ -9,7 +9,6 @@ import CopyIcon from "../icons/copy.svg";
import ClearIcon from "../icons/clear.svg"; import ClearIcon from "../icons/clear.svg";
import LoadingIcon from "../icons/three-dots.svg"; import LoadingIcon from "../icons/three-dots.svg";
import EditIcon from "../icons/edit.svg"; import EditIcon from "../icons/edit.svg";
import FireIcon from "../icons/fire.svg";
import EyeIcon from "../icons/eye.svg"; import EyeIcon from "../icons/eye.svg";
import DownloadIcon from "../icons/download.svg"; import DownloadIcon from "../icons/download.svg";
import UploadIcon from "../icons/upload.svg"; import UploadIcon from "../icons/upload.svg";
@ -19,7 +18,6 @@ import ConfirmIcon from "../icons/confirm.svg";
import ConnectionIcon from "../icons/connection.svg"; import ConnectionIcon from "../icons/connection.svg";
import CloudSuccessIcon from "../icons/cloud-success.svg"; import CloudSuccessIcon from "../icons/cloud-success.svg";
import CloudFailIcon from "../icons/cloud-fail.svg"; import CloudFailIcon from "../icons/cloud-fail.svg";
import { trackSettingsPageGuideToCPaymentClick } from "../utils/auth-settings-events";
import { import {
Input, Input,
List, List,
@ -49,8 +47,7 @@ import Locale, {
changeLang, changeLang,
getLang, getLang,
} from "../locales"; } from "../locales";
import { copyToClipboard, clientUpdate, semverCompare } from "../utils"; import { copyToClipboard, semverCompare } from "../utils";
import Link from "next/link";
import { import {
Anthropic, Anthropic,
Azure, Azure,
@ -71,7 +68,7 @@ import {
UPDATE_URL, UPDATE_URL,
Stability, Stability,
Iflytek, Iflytek,
SAAS_CHAT_URL, // SAAS_CHAT_URL removed
ChatGLM, ChatGLM,
DeepSeek, DeepSeek,
SiliconFlow, SiliconFlow,
@ -693,30 +690,7 @@ export function Settings() {
</ListItem> </ListItem>
); );
const saasStartComponent = ( // SaasStart component removed
<ListItem
className={styles["subtitle-button"]}
title={
Locale.Settings.Access.SaasStart.Title +
`${Locale.Settings.Access.SaasStart.Label}`
}
subTitle={Locale.Settings.Access.SaasStart.SubTitle}
>
<IconButton
aria={
Locale.Settings.Access.SaasStart.Title +
Locale.Settings.Access.SaasStart.ChatNow
}
icon={<FireIcon />}
type={"primary"}
text={Locale.Settings.Access.SaasStart.ChatNow}
onClick={() => {
trackSettingsPageGuideToCPaymentClick();
window.location.href = SAAS_CHAT_URL;
}}
/>
</ListItem>
);
const useCustomConfigComponent = // Conditionally render the following ListItem based on clientConfig.isApp const useCustomConfigComponent = // Conditionally render the following ListItem based on clientConfig.isApp
!clientConfig?.isApp && ( // only show if isApp is false !clientConfig?.isApp && ( // only show if isApp is false
@ -1510,6 +1484,7 @@ export function Settings() {
</Popover> </Popover>
</ListItem> </ListItem>
{/*
<ListItem <ListItem
title={Locale.Settings.Update.Version(currentVersion ?? "unknown")} title={Locale.Settings.Update.Version(currentVersion ?? "unknown")}
subTitle={ subTitle={
@ -1542,6 +1517,7 @@ export function Settings() {
/> />
)} )}
</ListItem> </ListItem>
*/}
<ListItem title={Locale.Settings.SendKey}> <ListItem title={Locale.Settings.SendKey}>
<Select <Select
@ -1775,7 +1751,7 @@ export function Settings() {
</List> </List>
<List id={SlotID.CustomModel}> <List id={SlotID.CustomModel}>
{saasStartComponent} {/* SaasStart component reference removed */}
{accessCodeComponent} {accessCodeComponent}
{!accessStore.hideUserApiKey && ( {!accessStore.hideUserApiKey && (

View File

@ -250,8 +250,8 @@ export function SideBar(props: { className?: string }) {
{...props} {...props}
> >
<SideBarHeader <SideBarHeader
title="NextChat" title="Agree AI Design"
subTitle="Build your own AI assistant." subTitle="Build your own AI design assistant."
logo={<ChatGptIcon />} logo={<ChatGptIcon />}
shouldNarrow={shouldNarrow} shouldNarrow={shouldNarrow}
> >

View File

@ -1,5 +1,5 @@
export const OWNER = "ChatGPTNextWeb"; export const OWNER = "xxx";
export const REPO = "ChatGPT-Next-Web"; export const REPO = "xxx";
export const REPO_URL = `https://github.com/${OWNER}/${REPO}`; export const REPO_URL = `https://github.com/${OWNER}/${REPO}`;
export const PLUGINS_REPO_URL = `https://github.com/${OWNER}/NextChat-Awesome-Plugins`; export const PLUGINS_REPO_URL = `https://github.com/${OWNER}/NextChat-Awesome-Plugins`;
export const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`; export const ISSUE_URL = `https://github.com/${OWNER}/${REPO}/issues`;
@ -107,7 +107,7 @@ export const ACCESS_CODE_PREFIX = "nk-";
export const LAST_INPUT_KEY = "last-input"; export const LAST_INPUT_KEY = "last-input";
export const UNFINISHED_INPUT = (id: string) => "unfinished-input-" + id; export const UNFINISHED_INPUT = (id: string) => "unfinished-input-" + id;
export const STORAGE_KEY = "chatgpt-next-web"; export const STORAGE_KEY = "agree-ai-design";
export const REQUEST_TIMEOUT_MS = 60000; export const REQUEST_TIMEOUT_MS = 60000;
export const REQUEST_TIMEOUT_MS_FOR_THINKING = REQUEST_TIMEOUT_MS * 5; export const REQUEST_TIMEOUT_MS_FOR_THINKING = REQUEST_TIMEOUT_MS * 5;
@ -373,7 +373,7 @@ You are an AI assistant with access to system tools. Your role is to help users
{ {
"method": "write_file", "method": "write_file",
"params": { "params": {
"path": "NextChat_Information.txt", "path": "Agree_AI_Design_Information.txt",
"content": "1" "content": "1"
} }
} }

View File

@ -9,10 +9,10 @@ import { GoogleTagManager, GoogleAnalytics } from "@next/third-parties/google";
import { getServerSideConfig } from "./config/server"; import { getServerSideConfig } from "./config/server";
export const metadata: Metadata = { export const metadata: Metadata = {
title: "NextChat", title: "Agree AI Design",
description: "Your personal ChatGPT Chat Bot.", description: "Your personal AI Design Assistant.",
appleWebApp: { appleWebApp: {
title: "NextChat", title: "Agree AI Design",
statusBarStyle: "default", statusBarStyle: "default",
}, },
}; };

View File

@ -14,7 +14,7 @@ export class MCPClientLogger {
private readonly debugMode: boolean; private readonly debugMode: boolean;
constructor( constructor(
prefix: string = "NextChat MCP Client", prefix: string = "Agree AI Design MCP Client",
debugMode: boolean = false, debugMode: boolean = false,
) { ) {
this.prefix = prefix; this.prefix = prefix;

View File

@ -1,5 +1,5 @@
{ {
"name": "nextchat", "name": "agree-ai-design",
"private": false, "private": false,
"license": "mit", "license": "mit",
"scripts": { "scripts": {
@ -29,6 +29,7 @@
"@vercel/analytics": "^0.1.11", "@vercel/analytics": "^0.1.11",
"@vercel/speed-insights": "^1.0.2", "@vercel/speed-insights": "^1.0.2",
"axios": "^1.7.5", "axios": "^1.7.5",
"bufferutil": "^4.0.9",
"clsx": "^2.1.1", "clsx": "^2.1.1",
"emoji-picker-react": "^4.9.2", "emoji-picker-react": "^4.9.2",
"fuse.js": "^7.0.0", "fuse.js": "^7.0.0",
@ -55,6 +56,7 @@
"sass": "^1.59.2", "sass": "^1.59.2",
"spark-md5": "^3.0.2", "spark-md5": "^3.0.2",
"use-debounce": "^9.0.4", "use-debounce": "^9.0.4",
"utf-8-validate": "^6.0.5",
"zod": "^3.24.1", "zod": "^3.24.1",
"zustand": "^4.3.8" "zustand": "^4.3.8"
}, },

View File

@ -3041,6 +3041,13 @@ buffer-from@^1.0.0:
resolved "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5" resolved "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ== integrity sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==
bufferutil@^4.0.9:
version "4.0.9"
resolved "https://registry.yarnpkg.com/bufferutil/-/bufferutil-4.0.9.tgz#6e81739ad48a95cad45a279588e13e95e24a800a"
integrity sha512-WDtdLmJvAuNNPzByAYpRo2rF1Mmradw6gvWsQKf63476DDXmomT9zUiGypLcG4ibIM67vhAj8jJRdbmEws2Aqw==
dependencies:
node-gyp-build "^4.3.0"
busboy@1.6.0: busboy@1.6.0:
version "1.6.0" version "1.6.0"
resolved "https://registry.npmmirror.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893" resolved "https://registry.npmmirror.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893"
@ -6758,6 +6765,11 @@ node-fetch@^3.3.1:
fetch-blob "^3.1.4" fetch-blob "^3.1.4"
formdata-polyfill "^4.0.10" formdata-polyfill "^4.0.10"
node-gyp-build@^4.3.0:
version "4.8.4"
resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.8.4.tgz#8a70ee85464ae52327772a90d66c6077a900cfc8"
integrity sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==
node-int64@^0.4.0: node-int64@^0.4.0:
version "0.4.0" version "0.4.0"
resolved "https://registry.npmmirror.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b" resolved "https://registry.npmmirror.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
@ -8333,6 +8345,13 @@ use-sync-external-store@1.2.0, use-sync-external-store@^1.0.0:
resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a" resolved "https://registry.yarnpkg.com/use-sync-external-store/-/use-sync-external-store-1.2.0.tgz#7dbefd6ef3fe4e767a0cf5d7287aacfb5846928a"
integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA== integrity sha512-eEgnFxGQ1Ife9bzYs6VLi8/4X6CObHMw9Qr9tPY43iKwsPw8xE8+EFsf/2cFZ5S3esXgpWgtSCtLNS41F+sKPA==
utf-8-validate@^6.0.5:
version "6.0.5"
resolved "https://registry.yarnpkg.com/utf-8-validate/-/utf-8-validate-6.0.5.tgz#8087d39902be2cc15bdb21a426697ff256d65aab"
integrity sha512-EYZR+OpIXp9Y1eG1iueg8KRsY8TuT8VNgnanZ0uA3STqhHQTLwbl+WX76/9X5OY12yQubymBpaBSmMPkSTQcKA==
dependencies:
node-gyp-build "^4.3.0"
uuid@^9.0.0: uuid@^9.0.0:
version "9.0.0" version "9.0.0"
resolved "https://registry.npmmirror.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5" resolved "https://registry.npmmirror.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5"