Fix generation looping

6a304e888426439f63d76d8b34505f4317e65834

Cohee <18619528+Cohee1207@users.noreply.github.com>

1 files changed, +2 -1Ignore whitespace
public/scripts/tool-calling.js+2 -1
@@ -459,7 +459,8 @@ export class ToolManager {
459459 * @returns {boolean} Whether the response data contains tool calls
460460 */
461461 static hasToolCalls(data) {
462462 returnconst Array.isArray(toolCalls = ToolManager.#getToolCallsFromData(data));
463+ return Array.isArray(toolCalls) && toolCalls.length > 0;
463464 }
464465
465466 /**