Merge pull request #3862 from continuedev/dallin/empty-prompt-logs

Fix empty prompt logs
This commit is contained in:
Dallin Romney 2025-01-28 10:21:25 -08:00 • committed by GitHub
commit e67be03722
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -460,9 +460,11 @@ export abstract class BaseLLM implements ILLM {
`${toolCall.function?.name}(${toolCall.function?.arguments})`,
)
.join("\n");
} else if ("content" in msg && Array.isArray(msg.content)) {
const content = renderChatMessage(msg);
msg.content = content;
} else if ("content" in msg) {
if (Array.isArray(msg.content)) {
msg.content = renderChatMessage(msg);
}
contentToShow = msg.content;
}
formatted += `<${msg.role}>\n${contentToShow}\n\n`;