feat: add more share config (#3120)

* feat: add more share config

* add i18n en
This commit is contained in:
papapatrick
2024-11-12 10:09:02 +08:00
committed by archer
parent f4e0dfc9bd
commit 5892ded567
30 changed files with 389 additions and 173 deletions

View File

@@ -18,12 +18,14 @@ export const getWorkflowResponseWrite = ({
res,
detail,
streamResponse,
id = getNanoid(24)
id = getNanoid(24),
showNodeStatus = true
}: {
res?: NextApiResponse;
detail: boolean;
streamResponse: boolean;
id?: string;
showNodeStatus?: boolean;
}) => {
return ({
write,
@@ -50,8 +52,18 @@ export const getWorkflowResponseWrite = ({
SseResponseEventEnum.toolResponse,
SseResponseEventEnum.updateVariables
];
if (!detail && detailEvent.includes(event)) return;
if (
!showNodeStatus &&
(event === SseResponseEventEnum.flowNodeStatus ||
event === SseResponseEventEnum.toolCall ||
event === SseResponseEventEnum.toolParams ||
event === SseResponseEventEnum.toolResponse)
)
return;
responseWrite({
res,
write,