# Allow pressing \`escape\` to cancel the current assistant generation \(\#10987\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 530224527d68809becc86191b2a85b89fc1110a2

Requested commit: 530224527d68809becc86191b2a85b89fc1110a2

Commit: 530224527d68809becc86191b2a85b89fc1110a2

Tree: 965231a9ce8cf074e3ecaac5be91510c765fb079

Author: Antonio Scandurra

Committer: GitHub

## Message

```
Allow pressing `escape` to cancel the current assistant generation (#10987)

If the assistant has already emitted some text, we will leave the
assistant message but maintain the cursor on the previous user message,
so that the user can easily discard the message by submitting again.

If no output was emitted yet, we simply delete the empty assistant
message.

Release Notes:

- N/A
```

## Parents

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

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