# assistant_slash_commands: Be more precise in content type matching \(\#29124\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 55fd8352e4d73ba77fe48897a11df9921e18e478

Requested commit: 55fd8352e4d73ba77fe48897a11df9921e18e478

Commit: 55fd8352e4d73ba77fe48897a11df9921e18e478

Tree: 0b19413a3d132186ba99fa323cf74659fe0de6d1

Author: Eva Pace

Committer: GitHub

## Message

````
assistant_slash_commands: Be more precise in content type matching (#29124)

While investigating https://github.com/zed-industries/zed/issues/28076,
I found out often times the content type header of a website comes with
more data, such as the `charset`. So instead of doing an equal
comparison, I changed to a `starts_with`.

You can see an example here:

```shell
$ curl -sS -D - https://github.com/zed-industries/zed/blob/main/Cargo.toml -o /dev/null | head -n 10
HTTP/2 200
date: Sun, 20 Apr 2025 10:19:52 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame,Accept-Encoding, Accept, X-Requested-With
etag: W/"92dabf048b34d04a1b1d94e29cae4aca"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
```

Release Notes:

- Improved Content Type matching of `/fetch` commands in Assistant

Co-authored-by: Peter Tripp <peter@zed.dev>
````

## Parents

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

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