share link random avatar (#3541)

* share link random avatar

* fix

* delete unused code
This commit is contained in:
heheer
2025-01-10 12:18:13 +08:00
committed by GitHub
parent cef8487ca1
commit b26345dcaa
4 changed files with 20 additions and 28 deletions

View File

@@ -104,14 +104,9 @@ const ChatBox = ({
showVoiceIcon = true,
showEmptyIntro = false,
active = true,
shareId,
outLinkUid,
teamId,
teamToken,
onStartChat
}: Props) => {
const ScrollContainerRef = useRef<HTMLDivElement>(null);
const router = useRouter();
const { t } = useTranslation();
const { toast } = useToast();
const { feConfigs } = useSystemStore();
@@ -925,10 +920,6 @@ const ChatBox = ({
isLastChild={index === chatRecords.length - 1}
{...{
showVoiceIcon,
shareId,
outLinkUid,
teamId,
teamToken,
statusBoxData,
questionGuides,
onMark: onMark(
@@ -1004,17 +995,13 @@ const ChatBox = ({
onCloseUserLike,
onMark,
onReadUserDislike,
outLinkUid,
questionGuides,
retryInput,
shareId,
showEmpty,
showMarkIcon,
showVoiceIcon,
statusBoxData,
t,
teamId,
teamToken,
userAvatar,
variableList?.length,
welcomeText

View File

@@ -12,6 +12,7 @@ import { getAppLatestVersion } from '@fastgpt/service/core/app/version/controlle
import { FlowNodeTypeEnum } from '@fastgpt/global/core/workflow/node/constant';
import { NextAPI } from '@/service/middleware/entry';
import { UserModelSchema } from '@fastgpt/global/support/user/type';
import { getRandomUserAvatar } from '@fastgpt/global/support/user/utils';
async function handler(req: NextApiRequest, res: NextApiResponse) {
let { chatId, shareId, outLinkUid } = req.query as InitOutLinkChatProps;
@@ -48,7 +49,7 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
chatId,
appId: app._id,
title: chat?.title,
userAvatar: tmb?.user?.avatar,
userAvatar: getRandomUserAvatar(),
variables: chat?.variables,
app: {
chatConfig: getAppChatConfig({