{{ message }}
Repository navigation
fix: enhance error handling in appendToolCallStatus method - #145
Merged
Merged
Conversation
Sheng Chen (jdneo)
commented
May 7, 2026
Member
Sheng Chen (jdneo)
requested review from
Zidong Lu (duzitong),
Ethan Hou (ethanyhou) and
xinyi-gong
as code owners
May 7, 2026 08:59
Contributor
There was a problem hiding this comment.
Pull request overview
Improves agent tool-call status rendering in the chat UI by ensuring error tool-call updates display meaningful text (preferring toolCall.error and falling back to progressMessage), and adds UI tests to validate the behavior.
Changes:
- Relaxed the early-return guard in
BaseTurnWidget.appendToolCallStatusto allow processing error-only tool-call updates. - Updated
errorstatus handling to set the status label text fromtoolCall.error(fallback toprogressMessage). - Added a new UI test suite covering multiple
errorstatus scenarios and overwrite behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Comments suppressed due to low confidence (1)
com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/chat/BaseTurnWidget.java:245
appendToolCallStatusnow correctly prefers a non-blankerrormessage for top-level tool calls, but therun_subagentpath still uses different fallback logic insidehandleSubagentToolCall(it checksStringUtils.isNotEmpty(toolCall.getError())and unconditionally sets that as text). This means a whitespace-onlyerrorcan still override a validprogressMessageand render as empty text for subagent failures. Consider aligninghandleSubagentToolCallwith the newisNotBlank/fallback behavior (and ideally sharing the same helper) so error text rendering is consistent for subagent and non-subagent tool calls.
String status = toolCall.getStatus().toLowerCase();
// Require a non-blank progressMessage for non-error events. For error events,
// also accept a non-blank `error` field as the displayable text.
boolean isError = "error".equals(status);
if (StringUtils.isBlank(toolCall.getProgressMessage())
&& (!isError || StringUtils.isBlank(toolCall.getError()))) {
return;
}
// Check if this is a run_subagent tool call
if ("run_subagent".equalsIgnoreCase(toolCall.getName())) {
handleSubagentToolCall(toolCall);
return;
Member
…essage localization
Member
Author
Ethan Hou (ethanyhou)
approved these changes
May 9, 2026
Closed
37 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


