4.8.9 test fix (#2330)

* perf: query extension prompt

* perf: get preview histories

* perf: i18n

* fix: share page cannot feedback

* fix: publish i18n
This commit is contained in:
Archer
2024-08-12 12:09:14 +08:00
committed by GitHub
parent e098b2f1dc
commit 02d6b7c788
14 changed files with 40 additions and 25 deletions

View File

@@ -1,6 +1,6 @@
{
"name": "app",
"version": "4.8.8",
"version": "4.8.9",
"private": false,
"scripts": {
"dev": "next dev",

View File

@@ -20,11 +20,11 @@ export const workflowBoxStyles: FlexProps = {
export const publishStatusStyle = {
unPublish: {
colorSchema: 'adora' as any,
text: i18nT('common:core.app.have_publish')
text: i18nT('common:core.app.not_published')
},
published: {
colorSchema: 'green' as any,
text: i18nT('common:core.app.not_published')
text: i18nT('common:core.app.have_publish')
}
};

View File

@@ -15,7 +15,6 @@ import PageContainer from '@/components/PageContainer';
import ChatHeader from './components/ChatHeader';
import ChatHistorySlider from './components/ChatHistorySlider';
import { serviceSideProps } from '@/web/common/utils/i18n';
import { checkChatSupportSelectFileByChatModels } from '@/web/core/chat/utils';
import { useTranslation } from 'next-i18next';
import { delChatRecordById, getChatHistories, getInitOutLinkChatInfo } from '@/web/core/chat/api';
import { getChatTitleFromChatMessage } from '@fastgpt/global/core/chat/utils';
@@ -97,7 +96,13 @@ const OutLink = ({ appName, appIntro, appAvatar }: Props) => {
} = useChat();
const startChat = useCallback(
async ({ messages, controller, generatingMessage, variables }: StartChatFnProps) => {
async ({
messages,
controller,
generatingMessage,
variables,
responseChatItemId
}: StartChatFnProps) => {
const completionChatId = chatId || getNanoid();
const histories = messages.slice(-1);
@@ -119,6 +124,7 @@ const OutLink = ({ appName, appIntro, appAvatar }: Props) => {
...variables,
...customVariables
},
responseChatItemId,
shareId,
chatId: completionChatId,
appType: chatData.app.type,

View File

@@ -79,7 +79,13 @@ const Chat = ({ myApps }: { myApps: AppListItemType[] }) => {
} = useChat();
const startChat = useCallback(
async ({ messages, controller, generatingMessage, variables }: StartChatFnProps) => {
async ({
messages,
controller,
generatingMessage,
variables,
responseChatItemId
}: StartChatFnProps) => {
const completionChatId = chatId || getNanoid();
// Just send a user prompt
const histories = messages.slice(-1);
@@ -91,6 +97,7 @@ const Chat = ({ myApps }: { myApps: AppListItemType[] }) => {
...variables,
...customVariables
},
responseChatItemId,
appId,
teamId,
teamToken,