mirror of
https://github.com/labring/FastGPT.git
synced 2025-12-25 20:02:47 +00:00
fix
This commit is contained in:
parent
e20ee81d62
commit
71c32b62a5
|
|
@ -67,11 +67,11 @@ export type OutLinkSchema<T extends OutlinkAppType = undefined> = {
|
|||
// whether to show the quote
|
||||
showCite: boolean;
|
||||
// whether to show the running status
|
||||
showRunningStatus?: boolean;
|
||||
showRunningStatus: boolean;
|
||||
// whether to show the full text reader
|
||||
showFullText?: boolean;
|
||||
showFullText: boolean;
|
||||
// whether can download source
|
||||
canDownloadSource?: boolean;
|
||||
canDownloadSource: boolean;
|
||||
|
||||
// response when request
|
||||
immediateResponse?: string;
|
||||
|
|
@ -94,10 +94,10 @@ export type OutLinkSchema<T extends OutlinkAppType = undefined> = {
|
|||
export type OutLinkEditType<T = undefined> = {
|
||||
_id?: string;
|
||||
name: string;
|
||||
showCite?: OutLinkSchema<T>['showCite'];
|
||||
showRunningStatus?: OutLinkSchema<T>['showRunningStatus'];
|
||||
showFullText?: OutLinkSchema<T>['showFullText'];
|
||||
canDownloadSource?: OutLinkSchema<T>['canDownloadSource'];
|
||||
showCite: OutLinkSchema<T>['showCite'];
|
||||
showRunningStatus: OutLinkSchema<T>['showRunningStatus'];
|
||||
showFullText: OutLinkSchema<T>['showFullText'];
|
||||
canDownloadSource: OutLinkSchema<T>['canDownloadSource'];
|
||||
// response when request
|
||||
immediateResponse?: string;
|
||||
// response when error or other situation
|
||||
|
|
|
|||
|
|
@ -43,19 +43,21 @@ const OutLinkSchema = new Schema({
|
|||
type: Date
|
||||
},
|
||||
|
||||
showRunningStatus: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
showCite: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
showRunningStatus: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
showFullText: {
|
||||
type: Boolean
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
canDownloadSource: {
|
||||
type: Boolean
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
limit: {
|
||||
maxUsagePoints: {
|
||||
|
|
|
|||
|
|
@ -50,7 +50,6 @@ const ResponseTags = ({
|
|||
const chatTime = historyItem.time || new Date();
|
||||
const durationSeconds = historyItem.durationSeconds || 0;
|
||||
const isResponseDetail = useContextSelector(ChatItemContext, (v) => v.isShowQuote);
|
||||
console.log('isResponseDetail', isResponseDetail);
|
||||
const {
|
||||
totalQuoteList: quoteList = [],
|
||||
llmModuleAccount = 0,
|
||||
|
|
|
|||
|
|
@ -182,10 +182,10 @@ const Share = ({ appId }: { appId: string; type: PublishChannelEnum }) => {
|
|||
setEditLinkData({
|
||||
_id: item._id,
|
||||
name: item.name,
|
||||
showCite: item.showCite ?? false,
|
||||
canDownloadSource: item.canDownloadSource ?? false,
|
||||
showFullText: item.showFullText ?? true,
|
||||
showRunningStatus: item.showRunningStatus ?? false,
|
||||
showCite: item.showCite,
|
||||
canDownloadSource: item.canDownloadSource,
|
||||
showFullText: item.showFullText,
|
||||
showRunningStatus: item.showRunningStatus,
|
||||
limit: item.limit
|
||||
})
|
||||
},
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useMemo } from 'react';
|
||||
import { Box, Flex, Grid, Switch, Button, Link } from '@chakra-ui/react';
|
||||
import { Box, Flex, Grid, Switch } from '@chakra-ui/react';
|
||||
import { useTranslation } from 'next-i18next';
|
||||
import { useForm } from 'react-hook-form';
|
||||
import FormLabel from '@fastgpt/web/components/common/MyBox/FormLabel';
|
||||
|
|
|
|||
|
|
@ -32,10 +32,10 @@ async function handler(req: ApiRequestProps<UpdatePlaygroundVisibilityConfigBody
|
|||
$set: {
|
||||
appId,
|
||||
type: PublishChannelEnum.playground,
|
||||
showRunningStatus: showRunningStatus ?? true,
|
||||
showCite: showCite ?? true,
|
||||
showFullText: showFullText ?? true,
|
||||
canDownloadSource: canDownloadSource ?? true
|
||||
showRunningStatus: showRunningStatus,
|
||||
showCite: showCite,
|
||||
showFullText: showFullText,
|
||||
canDownloadSource: canDownloadSource
|
||||
}
|
||||
},
|
||||
{ upsert: true }
|
||||
|
|
|
|||
|
|
@ -111,10 +111,11 @@ export async function authChatCrud({
|
|||
teamId: String(outLinkConfig.teamId),
|
||||
tmbId: String(outLinkConfig.tmbId),
|
||||
uid,
|
||||
|
||||
showCite: outLinkConfig.showCite,
|
||||
showRunningStatus: outLinkConfig.showRunningStatus ?? true,
|
||||
showFullText: outLinkConfig.showFullText ?? false,
|
||||
canDownloadSource: outLinkConfig.canDownloadSource ?? false,
|
||||
showRunningStatus: outLinkConfig.showRunningStatus,
|
||||
showFullText: outLinkConfig.showFullText,
|
||||
canDownloadSource: outLinkConfig.canDownloadSource,
|
||||
authType: AuthUserTypeEnum.outLink
|
||||
};
|
||||
}
|
||||
|
|
@ -127,9 +128,9 @@ export async function authChatCrud({
|
|||
tmbId: String(outLinkConfig.tmbId),
|
||||
uid,
|
||||
showCite: outLinkConfig.showCite,
|
||||
showRunningStatus: outLinkConfig.showRunningStatus ?? true,
|
||||
showFullText: outLinkConfig.showFullText ?? false,
|
||||
canDownloadSource: outLinkConfig.canDownloadSource ?? false,
|
||||
showRunningStatus: outLinkConfig.showRunningStatus,
|
||||
showFullText: outLinkConfig.showFullText,
|
||||
canDownloadSource: outLinkConfig.canDownloadSource,
|
||||
authType: AuthUserTypeEnum.outLink
|
||||
};
|
||||
}
|
||||
|
|
@ -140,9 +141,9 @@ export async function authChatCrud({
|
|||
chat,
|
||||
uid,
|
||||
showCite: outLinkConfig.showCite,
|
||||
showRunningStatus: outLinkConfig.showRunningStatus ?? true,
|
||||
showFullText: outLinkConfig.showFullText ?? false,
|
||||
canDownloadSource: outLinkConfig.canDownloadSource ?? false,
|
||||
showRunningStatus: outLinkConfig.showRunningStatus,
|
||||
showFullText: outLinkConfig.showFullText,
|
||||
canDownloadSource: outLinkConfig.canDownloadSource,
|
||||
authType: AuthUserTypeEnum.outLink
|
||||
};
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue