# agent: Use default prompts from prompt library in system prompt \(\#28915\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/502a0f6535a7f49e2a5fc0c8f504fda1f7da67a3)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 502a0f6535a7f49e2a5fc0c8f504fda1f7da67a3

Requested commit: 502a0f6535a7f49e2a5fc0c8f504fda1f7da67a3

Commit: 502a0f6535a7f49e2a5fc0c8f504fda1f7da67a3

Tree: 214465a64cb9b4b26f683054746b90a27ec03300

Author: Michael Sloan

Committer: GitHub

## Message

```
agent: Use default prompts from prompt library in system prompt (#28915)

Related to #28490.

- Default prompts from the prompt library are now included as "user
rules" in the system prompt.
- Presence of these user rules is shown at the beginning of the thread
in the UI.
_ Now uses an `Entity<PromptStore>` instead of an `Arc<PromptStore>`.
Motivation for this is emitting a `PromptsUpdatedEvent`.
- Now disallows concurrent reloading of the system prompt. Before this
change it was possible for reloads to race.

Release Notes:

- agent: Added support for including default prompts from the Prompt
Library as "user rules" in the system prompt.

---------

Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
```

## Parents

- [eea6cfb38360916777fad5c256913b96230b67f5](https://git.cafe/gitcafe/zed/commit/eea6cfb38360916777fad5c256913b96230b67f5?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/502a0f6535a7f49e2a5fc0c8f504fda1f7da67a3?format=markdown)
