Improve Commit Message Generation by Considering Chat History

Feature request for product/service

Cursor IDE

Describe the request

Problem

When commit messages are generated only from diffs, they tend to describe the code modifications (“Refactored X,” “Added Y,” “Removed Z”), which can be easily seen by reading the diff itself.
However, what engineers really need in the long term is to understand the reasoning — the decisions, trade-offs, or bug explanations that led to the change. That context often exists in the Cursor chat history, not in the code.

Proposed Solution

Allow the commit message generator to optionally incorporate relevant recent chat context (e.g., the last few exchanges) when generating commit messages.
This could be implemented in several ways:

An optional toggle like “Include recent chat context” before generating.

Automatic inclusion of chat reasoning if it’s closely tied to the modified files.

A hybrid approach where the user can highlight a chat segment to “attach” as reasoning context before generating the message.

Benefits

Commit messages become meaningful documentation of why code changed.

Reduces loss of context over time when reviewing history.

Strengthens Cursor’s unique advantage of combining AI chat + code understanding.

Aligns with real-world best practices in software engineering, where the “why” is more valuable than the “what”.

Example

Instead of:

“Refactored API endpoint and updated model validations.”

We’d get:

“Refactored API endpoint and updated model validations to fix duplicated entries issue related to concurrency in Celery tasks.”