chat file url white list (#6053)

* chat file url white list

* perf: white list

---------

Co-authored-by: archer <545436317@qq.com>
This commit is contained in:
heheer
2025-12-08 17:10:23 +08:00
committed by GitHub
parent 2ccb5b50c6
commit 5aaf123135
9 changed files with 106 additions and 26 deletions
@@ -527,7 +527,7 @@ const ChatBox = ({
file: {
type: file.type,
name: file.name,
url: file.url || '',
url: file.key ? undefined : file.url || '',
icon: file.icon || '',
key: file.key || ''
}
@@ -6,8 +6,10 @@ import { addLog } from '@fastgpt/service/common/system/log';
import { ChatRoleEnum, ChatSourceEnum } from '@fastgpt/global/core/chat/constants';
import { SseResponseEventEnum } from '@fastgpt/global/core/workflow/runtime/constants';
import { dispatchWorkFlow } from '@fastgpt/service/core/workflow/dispatch';
import type { ChatCompletionCreateParams } from '@fastgpt/global/core/ai/type.d';
import type { ChatCompletionMessageParam } from '@fastgpt/global/core/ai/type.d';
import type {
ChatCompletionCreateParams,
ChatCompletionMessageParam
} from '@fastgpt/global/core/ai/type.d';
import {
getWorkflowEntryNodeIds,
getMaxHistoryLimitFromNodes,
@@ -6,8 +6,10 @@ import { addLog } from '@fastgpt/service/common/system/log';
import { ChatRoleEnum, ChatSourceEnum } from '@fastgpt/global/core/chat/constants';
import { SseResponseEventEnum } from '@fastgpt/global/core/workflow/runtime/constants';
import { dispatchWorkFlow } from '@fastgpt/service/core/workflow/dispatch';
import type { ChatCompletionCreateParams } from '@fastgpt/global/core/ai/type.d';
import type { ChatCompletionMessageParam } from '@fastgpt/global/core/ai/type.d';
import type {
ChatCompletionCreateParams,
ChatCompletionMessageParam
} from '@fastgpt/global/core/ai/type.d';
import {
getWorkflowEntryNodeIds,
getMaxHistoryLimitFromNodes,