[Feedback]: Generate the commit message from the diff in Changes → Ship → Commit

未关闭
#158 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
30/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
git
领域
desktop, devtools

调研方向

The payload names no source files. Start from the Changes → Ship → Commit view and the default message Changes from Command Code, which is the fallback the request wants kept. Find where the commit is assembled and where the session model is called, then check how the diff and stat are gathered. Done means a generated conventional-commit message fills the editable field, a failure falls back to the default with a non-blocking error, and the user still has to click to commit.

由索引模型根据 Issue 内容生成。

描述

What would you like?

In Command Code Desktop's Changes → Ship → Commit flow, add a way to generate the commit message from the current changes instead of typing it manually or falling back to a static default.

Current behavior (Desktop 0.1.60, macOS)
  • The Ship menu has a "Commit message" textarea whose placeholder reads: Commit message (blank uses "Changes from Command Code").
  • Leaving it blank commits with the hardcoded message Changes from Command Code.
  • There is no generate action anywhere in the Changes view.
Proposed behavior
  • A "Generate" action next to the commit message field (and/or generate automatically when the field is empty), using the current session model.
  • The generation should read the diff/stat of everything the commit would include (the Changes view already states that a commit includes all current project changes, not only agent edits).
  • Output a conventional-commit style message (type(scope): subject, plus an optional body).
  • Keep it editable, and still require the user's click to commit.
  • On failure (model unavailable, empty diff, timeout), fall back to the current default message and show a non-blocking error.
Why

Writing the message by hand for every commit is repetitive, and the current workaround is to ask the agent in chat to run git commit or to generate a message and paste it into the field, which breaks the Ship flow.

Environment
  • Command Code Desktop 0.1.60
  • macOS
主要语言
Shell
星标
110
派生
9
平均合并
12 分钟
30 天内合并 PR
1

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CommandCodeAI/desktop 的其他 Issue

查看 CommandCodeAI/desktop 的全部 Issue

相似的 Issue

更多 Shell/Bash Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。