<%% tool_call_error = tool_call.tool_error_message %> <%% if tool_call_error.present? %>
<%%= render "messages/error", message: tool_calls, title: "Tool Call Error", error_message: tool_call_error %>
<%% else %>
<div id="message_<%%= tool_calls.id %>" class="message"
style="margin-bottom: 20px; padding: 10px; border-left: 3px solid #6b7280; background: #f9fafb;">
<div style="font-weight: bold; margin-bottom: 5px;"><%= tool_display_name %> Call</div>
<pre style="white-space: pre-wrap; margin: 0;"><%%= tool_call.name %>(<%%= tool_call.arguments.map { |k, v| "#{k}: #{v.inspect}" }.join(", ") %>)</pre>
<div style="font-size: 0.85em; color: #666; margin-top: 5px;">
<%%= tool_calls.created_at&.strftime("%I:%M %p") %>
</div>
</div>
<%% end %>