Cursor 这个点击用 AI 生成 commit message 怎么让它简洁一点?

2025 年 9 月 16 日
 ethusdt

本来是用 aicommit 这种命令行工具的,但发现 cursor 自带,但是问题是每次生成的 message 都巨长。即使在 cursor 设置中的 user rules 中加上规范它也不听。

到底哪里能搞一下这个 prompt 。

3378 次点击
所在节点    程序员
8 条回复
Rorysky
2025 年 9 月 16 日
不长呀,我一直手工这么写,这不挺好么?
ethusdt
2025 年 9 月 16 日
@Rorysky changelog 其实可以精简些的。这么详细适合放到 details 中。
YangQingLin
2025 年 9 月 17 日
可以试试在 .cursorrules 文件里面加要求。
我之前就是在那文件里面写让它在生成 commit 的时候根据内容带上合适的 emoji
或者你可以在编写 details 之前让 AI 总结一下
izjing666
2025 年 9 月 17 日
加不了,他是根据你历史的 message 格式生成的
ethusdt
2025 年 9 月 17 日
@izjing666 确实 它是根据历史 commit message 作为 history chat 配合 diff 内容来生成新 commit msg 的。
TsubasaHanekaw
2025 年 9 月 17 日
cursor 不清楚, copliot 现在开放了 聊天的 debug 模式 ,能看到他的提示词和请求信息, 里面不仅有 git diff 内容,还会引用我自定义的 copilot-commit-message.instructions
realJamespond
2025 年 9 月 17 日
改用 continue 自己写 prompt
zhengfan2016
2025 年 9 月 17 日
是吗,但是我的历史全是英文,cursor 还是能给我生成出中文的 commit ,window 客户端就是这样,macos 的客户端生成的是英文 commit

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1159710

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX