Skip to content

Commit

Permalink
bug fixes of polish logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Fengrui-Liu committed Mar 6, 2024
1 parent 472117f commit e409e4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/service/common/response/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,10 @@ export function responseWrite({

event && Write(`event: ${event}\n`);

if (!polish || event !== sseResponseEventEnum.response) {
if (
!polish ||
(event !== sseResponseEventEnum.response && event !== sseResponseEventEnum.answer)
) {
Write(`data: ${data}\n\n`);
}
}
1 change: 1 addition & 0 deletions projects/app/src/service/moduleDispatch/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,7 @@ export async function dispatchModules({
if (stream && detail && module.showStatus) {
responseStatus({
res,
polish,
name: module.name,
status: 'running'
});
Expand Down

0 comments on commit e409e4b

Please sign in to comment.