correct els if condition for state.inToolLoop

This commit is contained in:
Badri Narayanan S
2026-01-03 22:38:46 +05:30
parent b7286059ee
commit 668c7aef26

View File

@@ -464,7 +464,7 @@ export function closeToolLoopForThinking(messages) {
}); });
logger.debug('[ThinkingUtils] Applied thinking recovery for interrupted tool'); logger.debug('[ThinkingUtils] Applied thinking recovery for interrupted tool');
} else { } else if (state.inToolLoop) {
// For tool loops: add synthetic messages to close the loop // For tool loops: add synthetic messages to close the loop
const syntheticText = state.toolResultCount === 1 const syntheticText = state.toolResultCount === 1
? '[Tool execution completed.]' ? '[Tool execution completed.]'