mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-16 14:03:43 +08:00
提交修改
This commit is contained in:
@@ -239,7 +239,9 @@ export function Artifacts() {
|
||||
shadow
|
||||
onClick={() => previewRef.current?.reload()}
|
||||
/>
|
||||
<div className={styles["artifacts-title"]}>NextChat Artifacts</div>
|
||||
<div className={styles["artifacts-title"]}>
|
||||
Agree AI Design Artifacts
|
||||
</div>
|
||||
<ArtifactsShareButton
|
||||
id={id}
|
||||
getCode={() => code}
|
||||
|
||||
@@ -1,23 +1,16 @@
|
||||
import styles from "./auth.module.scss";
|
||||
import { IconButton } from "./button";
|
||||
import { useState, useEffect } from "react";
|
||||
import { useEffect } from "react";
|
||||
import { useNavigate } from "react-router-dom";
|
||||
import { Path, SAAS_CHAT_URL } from "../constant";
|
||||
import { Path } from "../constant";
|
||||
import { useAccessStore } from "../store";
|
||||
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 { getClientConfig } from "../config/client";
|
||||
import { PasswordInput } from "./ui-lib";
|
||||
import LeftIcon from "@/app/icons/left.svg";
|
||||
import { safeLocalStorage } from "@/app/utils";
|
||||
import {
|
||||
trackSettingsPageGuideToCPaymentClick,
|
||||
trackAuthorizationPageButtonToCPaymentClick,
|
||||
} from "../utils/auth-settings-events";
|
||||
|
||||
import clsx from "clsx";
|
||||
|
||||
const storage = safeLocalStorage();
|
||||
@@ -27,10 +20,7 @@ export function AuthPage() {
|
||||
const accessStore = useAccessStore();
|
||||
const goHome = () => navigate(Path.Home);
|
||||
const goChat = () => navigate(Path.Chat);
|
||||
const goSaas = () => {
|
||||
trackAuthorizationPageButtonToCPaymentClick();
|
||||
window.location.href = SAAS_CHAT_URL;
|
||||
};
|
||||
// SaasStart function removed
|
||||
|
||||
const resetAccessCode = () => {
|
||||
accessStore.update((access) => {
|
||||
@@ -48,7 +38,7 @@ export function AuthPage() {
|
||||
|
||||
return (
|
||||
<div className={styles["auth-page"]}>
|
||||
<TopBanner></TopBanner>
|
||||
{/* TopBanner removed */}
|
||||
<div className={styles["auth-header"]}>
|
||||
<IconButton
|
||||
icon={<LeftIcon />}
|
||||
@@ -115,75 +105,10 @@ export function AuthPage() {
|
||||
type="primary"
|
||||
onClick={goChat}
|
||||
/>
|
||||
<IconButton
|
||||
text={Locale.Auth.SaasTips}
|
||||
onClick={() => {
|
||||
goSaas();
|
||||
}}
|
||||
/>
|
||||
{/* SaasTips button removed */}
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
function TopBanner() {
|
||||
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>
|
||||
);
|
||||
}
|
||||
// TopBanner component removed
|
||||
|
||||
@@ -524,10 +524,8 @@ export function ImagePreviewer(props: {
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div className={styles["main-title"]}>NextChat</div>
|
||||
<div className={styles["sub-title"]}>
|
||||
github.com/ChatGPTNextWeb/ChatGPT-Next-Web
|
||||
</div>
|
||||
<div className={styles["main-title"]}>Agree AI Design</div>
|
||||
<div className={styles["sub-title"]}>blog.agree.host/ai</div>
|
||||
<div className={styles["icons"]}>
|
||||
<MaskAvatar avatar={config.avatar} />
|
||||
<span className={styles["icon-space"]}>&</span>
|
||||
|
||||
@@ -9,7 +9,6 @@ import CopyIcon from "../icons/copy.svg";
|
||||
import ClearIcon from "../icons/clear.svg";
|
||||
import LoadingIcon from "../icons/three-dots.svg";
|
||||
import EditIcon from "../icons/edit.svg";
|
||||
import FireIcon from "../icons/fire.svg";
|
||||
import EyeIcon from "../icons/eye.svg";
|
||||
import DownloadIcon from "../icons/download.svg";
|
||||
import UploadIcon from "../icons/upload.svg";
|
||||
@@ -19,7 +18,6 @@ import ConfirmIcon from "../icons/confirm.svg";
|
||||
import ConnectionIcon from "../icons/connection.svg";
|
||||
import CloudSuccessIcon from "../icons/cloud-success.svg";
|
||||
import CloudFailIcon from "../icons/cloud-fail.svg";
|
||||
import { trackSettingsPageGuideToCPaymentClick } from "../utils/auth-settings-events";
|
||||
import {
|
||||
Input,
|
||||
List,
|
||||
@@ -49,8 +47,7 @@ import Locale, {
|
||||
changeLang,
|
||||
getLang,
|
||||
} from "../locales";
|
||||
import { copyToClipboard, clientUpdate, semverCompare } from "../utils";
|
||||
import Link from "next/link";
|
||||
import { copyToClipboard, semverCompare } from "../utils";
|
||||
import {
|
||||
Anthropic,
|
||||
Azure,
|
||||
@@ -71,7 +68,7 @@ import {
|
||||
UPDATE_URL,
|
||||
Stability,
|
||||
Iflytek,
|
||||
SAAS_CHAT_URL,
|
||||
// SAAS_CHAT_URL removed
|
||||
ChatGLM,
|
||||
DeepSeek,
|
||||
SiliconFlow,
|
||||
@@ -693,30 +690,7 @@ export function Settings() {
|
||||
</ListItem>
|
||||
);
|
||||
|
||||
const saasStartComponent = (
|
||||
<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>
|
||||
);
|
||||
// SaasStart component removed
|
||||
|
||||
const useCustomConfigComponent = // Conditionally render the following ListItem based on clientConfig.isApp
|
||||
!clientConfig?.isApp && ( // only show if isApp is false
|
||||
@@ -1510,6 +1484,7 @@ export function Settings() {
|
||||
</Popover>
|
||||
</ListItem>
|
||||
|
||||
{/* 检查更新功能已隐藏
|
||||
<ListItem
|
||||
title={Locale.Settings.Update.Version(currentVersion ?? "unknown")}
|
||||
subTitle={
|
||||
@@ -1542,6 +1517,7 @@ export function Settings() {
|
||||
/>
|
||||
)}
|
||||
</ListItem>
|
||||
*/}
|
||||
|
||||
<ListItem title={Locale.Settings.SendKey}>
|
||||
<Select
|
||||
@@ -1775,7 +1751,7 @@ export function Settings() {
|
||||
</List>
|
||||
|
||||
<List id={SlotID.CustomModel}>
|
||||
{saasStartComponent}
|
||||
{/* SaasStart component reference removed */}
|
||||
{accessCodeComponent}
|
||||
|
||||
{!accessStore.hideUserApiKey && (
|
||||
|
||||
@@ -250,8 +250,8 @@ export function SideBar(props: { className?: string }) {
|
||||
{...props}
|
||||
>
|
||||
<SideBarHeader
|
||||
title="NextChat"
|
||||
subTitle="Build your own AI assistant."
|
||||
title="Agree AI Design"
|
||||
subTitle="Build your own AI design assistant."
|
||||
logo={<ChatGptIcon />}
|
||||
shouldNarrow={shouldNarrow}
|
||||
>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
export const OWNER = "ChatGPTNextWeb";
|
||||
export const REPO = "ChatGPT-Next-Web";
|
||||
export const OWNER = "xxx";
|
||||
export const REPO = "xxx";
|
||||
export const REPO_URL = `https://github.com/${OWNER}/${REPO}`;
|
||||
export const PLUGINS_REPO_URL = `https://github.com/${OWNER}/NextChat-Awesome-Plugins`;
|
||||
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 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_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",
|
||||
"params": {
|
||||
"path": "NextChat_Information.txt",
|
||||
"path": "Agree_AI_Design_Information.txt",
|
||||
"content": "1"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@ import { GoogleTagManager, GoogleAnalytics } from "@next/third-parties/google";
|
||||
import { getServerSideConfig } from "./config/server";
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: "NextChat",
|
||||
description: "Your personal ChatGPT Chat Bot.",
|
||||
title: "Agree AI Design",
|
||||
description: "Your personal AI Design Assistant.",
|
||||
appleWebApp: {
|
||||
title: "NextChat",
|
||||
title: "Agree AI Design",
|
||||
statusBarStyle: "default",
|
||||
},
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ export class MCPClientLogger {
|
||||
private readonly debugMode: boolean;
|
||||
|
||||
constructor(
|
||||
prefix: string = "NextChat MCP Client",
|
||||
prefix: string = "Agree AI Design MCP Client",
|
||||
debugMode: boolean = false,
|
||||
) {
|
||||
this.prefix = prefix;
|
||||
|
||||
Reference in New Issue
Block a user