Support MistralAI streaming tool calls

01f03dbf508a00240e3019c517d8f61166af9eb1

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

1 files changed, +2 -2Showing whitespace changes
public/scripts/tool-calling.js+2 -2
@@ -278,9 +278,9 @@ export class ToolManager {
278 }278 }
279279
280 for (const toolCallDelta of toolCallDeltas) {280 for (const toolCallDelta of toolCallDeltas) {
281 const toolCallIndex = (typeof toolCallDelta?.index === 'number') ? toolCallDelta.index : null;281 const toolCallIndex = (typeof toolCallDelta?.index === 'number') ? toolCallDelta.index : toolCallDeltas.indexOf(toolCallDelta);
282282
283 if (toolCallIndex === null) {283 if (isNaN(toolCallIndex) || toolCallIndex < 0) {
284 continue;284 continue;
285 }285 }
286286