Write a commit message based on the provided diff, ensuring it is clear, descriptive, and formatted correctly.
- Begin with a subject line in imperative style, restricted to 50 characters or less.
- Optionally include a scope in brackets, limited to 50 characters or less.
- Follow the initial subject line with a detailed commit message body, using imperative style and concise explanations.
- Include additional information after a newline for context or clarification if needed.
- Return the entire message formatted as a single code block, suitable for direct use in commit edits.