commit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Commit Workflow

提交工作流

When committing changes to this repository, follow these steps:
向本仓库提交变更时,请遵循以下步骤:

1. Build and typecheck

1. 构建与类型检查

Run both commands and ensure they pass:
bash
pnpm build && pnpm typecheck
Do not proceed if either fails. Fix all errors first.
运行以下两个命令并确保它们执行成功:
bash
pnpm build && pnpm typecheck
如果任一命令失败,请勿继续。请先修复所有错误。

2. Check what changed

2. 检查变更内容

bash
git status
git diff --stat
bash
git status
git diff --stat

3. Create a changeset file

3. 创建变更集文件

IMPORTANT: The CLI package is named
agent-media
(NOT
@agent-media/cli
).
Create
.changeset/<descriptive-name>.md
:
markdown
---
"agent-media": patch|minor|major
"@agent-media/core": patch|minor|major
"@agent-media/providers": patch|minor|major
"@agent-media/image": patch|minor|major
"@agent-media/audio": patch|minor|major
"@agent-media/video": patch|minor|major
---

Brief description of changes
Only include packages that were actually modified. Use:
  • patch
    for bug fixes
  • minor
    for new features (backward compatible)
  • major
    for breaking changes
重要提示: CLI包的名称为
agent-media
(而非
@agent-media/cli
)。
创建
.changeset/<描述性名称>.md
文件:
markdown
---
"agent-media": patch|minor|major
"@agent-media/core": patch|minor|major
"@agent-media/providers": patch|minor|major
"@agent-media/image": patch|minor|major
"@agent-media/audio": patch|minor|major
"@agent-media/video": patch|minor|major
---

变更内容的简要描述
仅包含实际被修改的包。请使用:
  • patch
    用于修复bug
  • minor
    用于添加向后兼容的新功能
  • major
    用于不兼容的破坏性变更

4. Create feature branch

4. 创建功能分支

bash
git checkout -b feat/<descriptive-name>
bash
git checkout -b feat/<描述性名称>

or fix/<descriptive-name> for bug fixes

若为bug修复,使用fix/<描述性名称>

undefined
undefined

5. Stage and commit

5. 暂存并提交

bash
git add <files> .changeset/<name>.md
git commit -m "feat|fix: descriptive message"
bash
git add <文件> .changeset/<名称>.md
git commit -m "feat|fix: 描述性信息"

6. Push and create PR

6. 推送并创建PR

bash
git push -u origin <branch-name>
gh pr create --title "..." --body "..."
Note: If you need to switch GitHub accounts for PR creation, check
.claude.local/workflow.md
for your personal account switching commands.
bash
git push -u origin <分支名称>
gh pr create --title "..." --body "..."
注意: 如果创建PR时需要切换GitHub账户,请查看
.claude.local/workflow.md
获取个人账户切换命令。

Important reminders

重要提醒

  • NEVER manually edit CHANGELOG.md - changesets auto-generates it
  • NEVER run
    pnpm changeset version
    locally
  • ALWAYS run
    pnpm build && pnpm typecheck
    before committing
  • ALWAYS sync README.md to packages/cli/README.md when README changes
  • 切勿手动编辑CHANGELOG.md - 变更集会自动生成该文件
  • 切勿在本地运行
    pnpm changeset version
  • 务必在提交前运行
    pnpm build && pnpm typecheck
  • 务必当根目录README变更时,同步更新packages/cli/README.md