perf: detail=false, not response variable update (#1419)

This commit is contained in:
Archer
2024-05-09 16:44:52 +08:00
committed by GitHub
parent af4c732d93
commit 6463427d93
2 changed files with 6 additions and 6 deletions

View File

@@ -288,13 +288,13 @@ async function handler(req: NextApiRequest, res: NextApiResponse) {
event: detail ? SseResponseEventEnum.answer : undefined,
data: '[DONE]'
});
responseWrite({
res,
event: SseResponseEventEnum.updateVariables,
data: JSON.stringify(newVariables)
});
if (responseDetail && detail) {
responseWrite({
res,
event: SseResponseEventEnum.updateVariables,
data: JSON.stringify(newVariables)
});
responseWrite({
res,
event: SseResponseEventEnum.flowResponses,