mirror of
https://github.com/zed-industries/zed.git
synced 2026-07-10 00:13:29 +00:00
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> |
||
|---|---|---|
| .. | ||
| default.json | ||
| default_semantic_token_rules.json | ||
| initial_debug_tasks.json | ||
| initial_local_debug_tasks.json | ||
| initial_local_settings.json | ||
| initial_server_settings.json | ||
| initial_tasks.json | ||
| initial_user_settings.json | ||