# acp_thread: Make UserMessageId required in AgentConnection::prompt \(\#53850\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 549db9fbb33e09fac82e7441db5857d6f8f670de

Requested commit: 549db9fbb33e09fac82e7441db5857d6f8f670de

Commit: 549db9fbb33e09fac82e7441db5857d6f8f670de

Tree: ab1f9e4879349ce7e43d0d1a7fdd316e96368ecb

Author: Eric Holk

Committer: GitHub

## Message

```
acp_thread: Make UserMessageId required in AgentConnection::prompt (#53850)

The `user_message_id` parameter on `AgentConnection::prompt` was
`Option<UserMessageId>`, but `NativeAgentConnection::prompt` immediately
called `.expect()` on it, crashing when the value was `None`.

Because the `expect` message said `UserMessageId` was required, this PR
makes the parameter not optional which makes the panic impossible.

This means we also need to unconditionally generate an ID in `send`,
where before we gated this on whether `truncate` returned `Some`.
Generating IDs unconditionally should be find, especially because the
prompt requires them.

Release Notes:

- N/A
```

## Parents

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

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