Skip to content

Commit 6e5528d

Browse files
committed
Python: narrow leftover tool-call ids so pyright accepts the update
1 parent 9110347 commit 6e5528d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎python/packages/ag-ui/agent_framework_ag_ui/_agent_run.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1570,7 +1570,7 @@ def _append_segmented_snapshot_messages(flow: FlowState, all_messages: list[dict
15701570

15711571
leftover_calls = [tc for tc in flow.pending_tool_calls if tc.get("id") not in emitted_call_ids]
15721572
if leftover_calls:
1573-
leftover_ids = {call.get("id") for call in leftover_calls if call.get("id") is not None}
1573+
leftover_ids = {cid for call in leftover_calls if (cid := call.get("id")) is not None}
15741574
all_messages.append(
15751575
{
15761576
"id": tool_open_id or generate_event_id(),

0 commit comments

Comments
 (0)