Repository navigation
fix: the conversation stops while a node is generating output, the output already produced by that node is not displayed in the execution details - #8193
Conversation
…tput already produced by that node is not displayed in the execution details
| const showContent = computed(() => isSuccess.value || isCancelled.value || props.showContentOnError) | ||
| </script> | ||
|
|
||
| <template> |
There was a problem hiding this comment.
The code contains a logical inconsistency that needs clarification:
Critical Issue:
Using status 201 (isCancelled) is highly unconventional. In standard HTTP semantics:
200= OK (Success)201= Created (Success, but different from200)4xx/5xx= Errors- Cancellation is typically represented by status
499(Non-standard) or explicitly via API response content, not a2xxsuccess series code.
If "Cancelled" means the operation was canceled by the user and should be treated as a "success-like" state for UI purposes, consider renaming the variable to isCreated or using a specific non-200 success code if your backend supports it. If it truly means "canceled," ensure your backend actually returns 201 for this case, which is likely a bug.
Optimization Suggestions:
- Performance: The current implementation is fine.
computedproperties are cached and only recalculate when dependencies (props.data,props.showContentOnError) change. - Optional Chaining: Good use of
?.forprops.data. - Readability: Consider renaming
isCancelledto something more accurate if it doesn't mean HTTP cancellation. For example, if201means "Created", name itisCreated.
Code Review Summary:
✅ Syntax is valid.
status === 201 truly represents "cancelled" in your context. This may indicate a backend contract mismatch.
fix: the conversation stops while a node is generating output, the output already produced by that node is not displayed in the execution details