Skip to content
Closed

1111 #6507

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/components/artifacts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
89 changes: 7 additions & 82 deletions app/components/auth.tsx
Original file line number Diff line number Diff line change
@@ -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();
Expand All @@ -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) => {
Expand All @@ -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 />}
Expand Down Expand Up @@ -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
6 changes: 2 additions & 4 deletions app/components/exporter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down
36 changes: 6 additions & 30 deletions app/components/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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,
Expand Down Expand Up @@ -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,
Expand All @@ -71,7 +68,7 @@ import {
UPDATE_URL,
Stability,
Iflytek,
SAAS_CHAT_URL,
// SAAS_CHAT_URL removed
ChatGLM,
DeepSeek,
SiliconFlow,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1510,6 +1484,7 @@ export function Settings() {
</Popover>
</ListItem>

{/* 检查更新功能已隐藏
<ListItem
title={Locale.Settings.Update.Version(currentVersion ?? "unknown")}
subTitle={
Expand Down Expand Up @@ -1542,6 +1517,7 @@ export function Settings() {
/>
)}
</ListItem>
*/}

<ListItem title={Locale.Settings.SendKey}>
<Select
Expand Down Expand Up @@ -1775,7 +1751,7 @@ export function Settings() {
</List>

<List id={SlotID.CustomModel}>
{saasStartComponent}
{/* SaasStart component reference removed */}
{accessCodeComponent}

{!accessStore.hideUserApiKey && (
Expand Down
4 changes: 2 additions & 2 deletions app/components/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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}
>
Expand Down
8 changes: 4 additions & 4 deletions app/constant.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const OWNER = "ChatGPTNextWeb";
export const REPO = "ChatGPT-Next-Web";
export const OWNER = "xxx";
export const REPO = "xxx";
Comment on lines +1 to +2
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Critical: Replace placeholder values with actual repository information.

The OWNER and REPO constants have been set to "xxx" which are placeholder values. This will break all functionality that depends on these constants, including update checking, issue reporting, and GitHub API calls.

Please replace these with the actual repository owner and name:

-export const OWNER = "xxx";
-export const REPO = "xxx";
+export const OWNER = "your-actual-owner";
+export const REPO = "your-actual-repo-name";
🤖 Prompt for AI Agents
In app/constant.ts at lines 1 to 2, the OWNER and REPO constants are set to
placeholder values "xxx". Replace these placeholders with the actual GitHub
repository owner and repository name strings to ensure all dependent
functionality like update checking and API calls work correctly.

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`;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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"
}
}
Expand Down
6 changes: 3 additions & 3 deletions app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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",
},
};
Expand Down
2 changes: 1 addition & 1 deletion app/mcp/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "nextchat",
"name": "agree-ai-design",
"private": false,
"license": "mit",
"scripts": {
Expand Down Expand Up @@ -29,6 +29,7 @@
"@vercel/analytics": "^0.1.11",
"@vercel/speed-insights": "^1.0.2",
"axios": "^1.7.5",
"bufferutil": "^4.0.9",
"clsx": "^2.1.1",
"emoji-picker-react": "^4.9.2",
"fuse.js": "^7.0.0",
Expand All @@ -55,6 +56,7 @@
"sass": "^1.59.2",
"spark-md5": "^3.0.2",
"use-debounce": "^9.0.4",
"utf-8-validate": "^6.0.5",
"zod": "^3.24.1",
"zustand": "^4.3.8"
},
Expand Down
19 changes: 19 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3041,6 +3041,13 @@ buffer-from@^1.0.0:
resolved "https://registry.npmmirror.com/buffer-from/-/buffer-from-1.1.2.tgz#2b146a6fd72e80b4f55d255f35ed59a3a9a41bd5"
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:
version "1.6.0"
resolved "https://registry.npmmirror.com/busboy/-/busboy-1.6.0.tgz#966ea36a9502e43cdb9146962523b92f531f6893"
Expand Down Expand Up @@ -6758,6 +6765,11 @@ node-fetch@^3.3.1:
fetch-blob "^3.1.4"
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:
version "0.4.0"
resolved "https://registry.npmmirror.com/node-int64/-/node-int64-0.4.0.tgz#87a9065cdb355d3182d8f94ce11188b825c68a3b"
Expand Down Expand Up @@ -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"
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:
version "9.0.0"
resolved "https://registry.npmmirror.com/uuid/-/uuid-9.0.0.tgz#592f550650024a38ceb0c562f2f6aa435761efb5"
Expand Down
Loading