Fix missing tool call output
This commit is contained in:
@@ -1328,12 +1328,9 @@ class Odidere {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stash assistant messages with tool calls; don't render yet.
|
// Stash assistant messages with tool calls; render once all
|
||||||
if (
|
// tool results have arrived so the output is visible in the UI.
|
||||||
message.role === 'assistant' &&
|
if (message.role === 'assistant' && message.tool_calls?.length > 0) {
|
||||||
message.tool_calls?.length > 0 &&
|
|
||||||
!message.content
|
|
||||||
) {
|
|
||||||
const appended = this.#appendHistory([message]);
|
const appended = this.#appendHistory([message]);
|
||||||
pendingTools = {
|
pendingTools = {
|
||||||
assistant: appended[0],
|
assistant: appended[0],
|
||||||
@@ -1364,6 +1361,10 @@ class Odidere {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Regular assistant message (final reply with content).
|
// Regular assistant message (final reply with content).
|
||||||
|
// Skip non-assistant messages (tool results, etc.) that may have
|
||||||
|
// fallen through above — they should not be rendered or spoken.
|
||||||
|
if (message.role !== 'assistant') continue;
|
||||||
|
|
||||||
const meta = {};
|
const meta = {};
|
||||||
if (event.voice) meta.voice = event.voice;
|
if (event.voice) meta.voice = event.voice;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user