mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-11-16 05:53:42 +08:00
Remove the unauth complaint
This commit is contained in:
@@ -25,6 +25,7 @@ import CancelIcon from "../icons/cancel.svg";
|
||||
import StopIcon from "../icons/pause.svg";
|
||||
import McpToolIcon from "../icons/tool.svg";
|
||||
import {
|
||||
BOT_HELLO,
|
||||
ChatMessage,
|
||||
createMessage,
|
||||
DEFAULT_TOPIC,
|
||||
@@ -1055,6 +1056,18 @@ function _Chat() {
|
||||
return session.mask.hideContext ? [] : session.mask.context.slice();
|
||||
}, [session.mask.context, session.mask.hideContext]);
|
||||
|
||||
if (
|
||||
context.length === 0 &&
|
||||
session.messages.at(0)?.content !== BOT_HELLO.content
|
||||
) {
|
||||
// Intentionally prevent adding BOT_HELLO message
|
||||
// const copiedHello = Object.assign({}, BOT_HELLO);
|
||||
// if (!accessStore.isAuthorized()) {
|
||||
// copiedHello.content = Locale.Error.Unauthorized;
|
||||
// }
|
||||
// context.push(copiedHello);
|
||||
}
|
||||
|
||||
// preview messages
|
||||
const renderMessages = useMemo(() => {
|
||||
return context.concat(session.messages as RenderMessage[]).concat(
|
||||
|
||||
Reference in New Issue
Block a user