V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
ethusdt
0.01D
V2EX  ›  程序员

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

  •  
  •   ethusdt ·
    FaiChou · Sep 16, 2025 · 2773 views
    This topic created in 223 days ago, the information mentioned may be changed or developed.

    vscode

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

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

    8 replies    2025-09-17 22:19:10 +08:00
    Rorysky
        1
    Rorysky  
       Sep 16, 2025
    不长呀,我一直手工这么写,这不挺好么?
    ethusdt
        2
    ethusdt  
    OP
       Sep 16, 2025
    @Rorysky changelog 其实可以精简些的。这么详细适合放到 details 中。
    YangQingLin
        3
    YangQingLin  
       Sep 17, 2025
    可以试试在 .cursorrules 文件里面加要求。
    我之前就是在那文件里面写让它在生成 commit 的时候根据内容带上合适的 emoji
    或者你可以在编写 details 之前让 AI 总结一下
    izjing666
        4
    izjing666  
       Sep 17, 2025
    加不了,他是根据你历史的 message 格式生成的
    ethusdt
        5
    ethusdt  
    OP
       Sep 17, 2025
    @izjing666 确实 它是根据历史 commit message 作为 history chat 配合 diff 内容来生成新 commit msg 的。
    TsubasaHanekaw
        6
    TsubasaHanekaw  
       Sep 17, 2025
    cursor 不清楚, copliot 现在开放了 聊天的 debug 模式 ,能看到他的提示词和请求信息, 里面不仅有 git diff 内容,还会引用我自定义的 copilot-commit-message.instructions
    realJamespond
        7
    realJamespond  
       Sep 17, 2025
    改用 continue 自己写 prompt
    zhengfan2016
        8
    zhengfan2016  
       Sep 17, 2025
    是吗,但是我的历史全是英文,cursor 还是能给我生成出中文的 commit ,window 客户端就是这样,macos 的客户端生成的是英文 commit
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   948 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 21:46 · PVG 05:46 · LAX 14:46 · JFK 17:46
    ♥ Do have faith in what you're doing.