This commit is contained in:
heheer 2025-12-22 15:12:24 +08:00
parent e20ee81d62
commit 71c32b62a5
No known key found for this signature in database
GPG Key ID: 37DCB43201661540
7 changed files with 34 additions and 32 deletions

View File

@ -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

View File

@ -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: {

View File

@ -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,

View File

@ -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
})
},

View File

@ -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';

View File

@ -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 }

View File

@ -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
};
}