Skip to content

Commit 3c20d05

Browse files
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 3c20d05

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)