';
if (r.error) {
html += '
β οΈ Error: ' + this._escapeHtml(r.error) + '
';
}
if (content) {
var safe = this._escapeHtml(content.length > 1000 ? content.substring(0, 1000) + '...(' + content.length + ' chars)' : content);
html += '
Content:
' + safe + '
';
} else if (!hasTools) {
html += '
β οΈ Empty response (no content, no tool calls)
';
}
if (hasTools) {
html += '
Tool calls: ' + this._escapeHtml(toolStr) + '
';
}
html += '