fix: mark timed-out tool calls as orange Timeout status - #100
Open
shichenshuo-star wants to merge 1 commit into
Open
fix: mark timed-out tool calls as orange Timeout status#100shichenshuo-star wants to merge 1 commit into
shichenshuo-star wants to merge 1 commit into
Conversation
The gateway's injected progress hook only forwarded `preview` (always empty for tool.completed events) and dropped the `is_error`/`result` kwargs, so tool timeouts (and ordinary errors) were recorded as success and rendered with a green "Succeeded" label. - Forward is_error/result from the injected progress hook through patch.on_tool_updated to controller.on_tool_update - Add ToolStatus.TIMEOUT with "timed out" text detection in tooluse.py - Render timeout steps with an orange Timeout label and no raw result JSON block; ordinary errors show red Failed with a readable message extracted from the JSON-wrapped result - Add unit tests for the hook forwarding, tracker status mapping, and card label rendering
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.
Summary
Tool calls that time out currently render with a green Succeeded label in the Feishu card, because the injected gateway progress hook only forwarded
preview(which is always empty fortool.completedevents) and dropped theis_error/resultkwargs. Ordinary tool errors are mislabeled the same way.Changes
is_errorandresultfrom the gatewayprogress_callbackkwargs throughon_tool_updatedintoon_tool_update; error/timeout results are recorded as errors instead of successes.ToolStatus.TIMEOUTwithtimed outtext detection (_resolve_end_status); timeout steps carry no error block, ordinary errors show a readable message extracted from JSON-wrapped results (_extract_error_message).lark_mdfont tag only supports preset color names, soorangeis used instead of#FFFF00).Screenshots / verification
Run command (1.3 s) · Timeoutin orange with no raw JSON block attached.