Skip to content

Commit 99dfdb6

Browse files
author
xichaodong
committed
refactor(core): remove redundant hasPendingToolUse check in doCall
The check at line 275 is always true because the early return at line 268 already guarantees pendingIds is non-empty at that point. Simplify to call acting(0) directly.
1 parent de01c66 commit 99dfdb6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

agentscope-core/src/main/java/io/agentscope/core/ReActAgent.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ protected Mono<Msg> doCall(List<Msg> msgs) {
272272

273273
// Has pending tools but no input -> resume (execute pending tools directly)
274274
if (msgs == null || msgs.isEmpty()) {
275-
return hasPendingToolUse() ? acting(0) : executeIteration(0);
275+
return acting(0);
276276
}
277277

278278
// Has pending tools + input -> check if user provided tool results

0 commit comments

Comments
 (0)