fix(cli): show tool output for tools without a priority annotation (#12436)

This commit is contained in:
Yuyang Li 2026-09-25 05:43:17 +00:00 • committed by GitHub
parent 61830521ad
commit b509488afd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -628,9 +628,10 @@ fn render_tool_response(resp: &ToolResponse, debug: bool) {
.unwrap_or(DEFAULT_MIN_PRIORITY);
let priority = annotations.and_then(|a| a.priority);
if priority.is_some_and(|priority| priority < min_priority)
|| (priority.is_none() && !debug)
{
// Tools without a priority annotation default to 0.0 (the same
// as DEFAULT_MIN_PRIORITY), so they are shown at the default
// threshold and only hidden when the user raises it.
if priority.unwrap_or(0.0) < min_priority {
continue;
}