zed/assets/settings
Lavi Sharma 3856272188
agent: Add commit message project rules toggle (#56867)
This follows up on discussion #56551.

Right now, when Zed generates a commit message, it includes project
rules files like `AGENTS.md`, `CLAUDE.md`, and `.rules` in the prompt
alongside the git diff. That can add a lot of extra context for a task
that is really just summarizing the changes in a commit.

This PR adds an `include_project_rules` option to
`agent.commit_message_model`. When it is set to `false`, Zed skips
loading project rules when generating commit messages. If the option is
omitted, the current behavior stays the same.

Example:

```json
   {
     "agent": {
       "commit_message_model": {
         "provider": "anthropic",
         "model": "claude-3-5-haiku",
         "include_project_rules": false
       }
     }
   }
 ```

I also updated the settings plumbing so this option is only used for commit message generation and defaults to true when not specified.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content is consistent with the [UI/UX checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

 Release Notes:

 - agent: Added setting to exclude project rules files from commit message generation prompts (`agent.commit_message_include_project_rules`)

---------

Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
2026-06-30 10:21:40 +00:00
..
default.json agent: Add commit message project rules toggle (#56867) 2026-06-30 10:21:40 +00:00
default_semantic_token_rules.json languages: Improve semantic token highlighting for parameters and Python (#52130) 2026-03-23 16:10:55 +00:00
initial_debug_tasks.json Add trailing commas to all asset jsonc files following #43854 (#44891) 2025-12-15 15:09:52 +00:00
initial_local_debug_tasks.json Simplify debug launcher UI (#31928) 2025-06-02 21:24:08 +00:00
initial_local_settings.json Fix broken link in initial settings (#15119) 2024-07-25 08:25:27 -04:00
initial_server_settings.json Add trailing commas to all asset jsonc files following #43854 (#44891) 2025-12-15 15:09:52 +00:00
initial_tasks.json Don't save buffers by default when running tasks (#52976) 2026-04-02 13:09:29 +00:00
initial_user_settings.json Add trailing commas to all asset jsonc files following #43854 (#44891) 2025-12-15 15:09:52 +00:00