Fix missing tool call output
This commit is contained in:
@@ -1328,12 +1328,9 @@ class Odidere {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Stash assistant messages with tool calls; don't render yet.
|
||||
if (
|
||||
message.role === 'assistant' &&
|
||||
message.tool_calls?.length > 0 &&
|
||||
!message.content
|
||||
) {
|
||||
// Stash assistant messages with tool calls; render once all
|
||||
// tool results have arrived so the output is visible in the UI.
|
||||
if (message.role === 'assistant' && message.tool_calls?.length > 0) {
|
||||
const appended = this.#appendHistory([message]);
|
||||
pendingTools = {
|
||||
assistant: appended[0],
|
||||
@@ -1364,6 +1361,10 @@ class Odidere {
|
||||
}
|
||||
|
||||
// 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 = {};
|
||||
if (event.voice) meta.voice = event.voice;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user