mirror of
https://github.com/langgenius/dify.git
synced 2026-05-10 22:28:55 +08:00
fix: preserve repeated shared trace details
This commit is contained in:
parent
84d1b05501
commit
cd9306d4f9
@ -196,6 +196,7 @@ describe('workflow-stream-handlers helpers', () => {
|
||||
id: 'iter-trace-2',
|
||||
node_id: 'iter-1',
|
||||
status: NodeRunningStatus.Succeeded,
|
||||
details: undefined,
|
||||
}))
|
||||
const loopNextProcess = appendParallelNext(iterFinishedProcess, createTrace({
|
||||
id: 'loop-trace-2',
|
||||
@ -205,6 +206,7 @@ describe('workflow-stream-handlers helpers', () => {
|
||||
id: 'loop-trace-2',
|
||||
node_id: 'loop-1',
|
||||
status: NodeRunningStatus.Succeeded,
|
||||
details: undefined,
|
||||
}))
|
||||
|
||||
expect(loopFinishedProcess.tracing[0]).toEqual(expect.objectContaining({
|
||||
|
||||
@ -93,8 +93,11 @@ const finishParallelTrace = (current: WorkflowProcess | undefined, data: NodeTra
|
||||
draft.expand = true
|
||||
const traceIndex = findParallelTraceIndex(draft.tracing, data)
|
||||
if (traceIndex > -1) {
|
||||
const currentTrace = draft.tracing[traceIndex]
|
||||
draft.tracing[traceIndex] = {
|
||||
...currentTrace,
|
||||
...data,
|
||||
details: data.details ?? currentTrace.details,
|
||||
expand: !!data.error,
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user