fix(agents): handle string assistant message content · openclaw/openclaw@c70b984
openclaw
·
2026-06-16
·
via Recent Commits to openclaw:main
Commit c70b984
fix(agents): handle string assistant message content
1 file changed
Lines changed: 3 additions & 0 deletions
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|
@@ -780,6 +780,9 @@ function hasOwnProperty(value: object, key: string): boolean {
|
780 | 780 | } |
781 | 781 | |
782 | 782 | function hasAssistantToolCallArguments(message: Extract<Message, { role: "assistant" }>): boolean { |
| 783 | +if (!Array.isArray(message.content)) { |
| 784 | +return false; |
| 785 | +} |
783 | 786 | return message.content.some( |
784 | 787 | (part) => part.type === "toolCall" && hasOwnProperty(part, "arguments"), |
785 | 788 | ); |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。
0 commit comments