File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -396,9 +396,7 @@ def should_pause_invocation(self, event: Event) -> bool:
396396
397397 return False
398398
399- def has_unresolved_long_running_tool_calls (
400- self , events : list [Event ]
401- ) -> bool :
399+ def has_unresolved_long_running_tool_calls (self , events : list [Event ]) -> bool :
402400 """Returns whether any long-running tool call in events is unresolved."""
403401 if not self .is_resumable or not events :
404402 return False
@@ -407,7 +405,7 @@ def has_unresolved_long_running_tool_calls(
407405 function_response .id
408406 for event in events
409407 for function_response in event .get_function_responses ()
410- if function_response .id
408+ if function_response .id and event . author == 'user'
411409 }
412410
413411 for event in reversed (events ):
@@ -417,7 +415,7 @@ def has_unresolved_long_running_tool_calls(
417415 paused_function_call_ids = {
418416 function_call .id
419417 for function_call in event .get_function_calls ()
420- if function_call .id in event .long_running_tool_ids
418+ if event . long_running_tool_ids and function_call .id in event .long_running_tool_ids
421419 }
422420 if paused_function_call_ids - function_response_ids :
423421 return True
You can’t perform that action at this time.
0 commit comments