# acp: Fix read_file tool flickering \(\#36854\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 8c83281399d013aab4415b4e425063be5a02b89e

Requested commit: 8c83281399d013aab4415b4e425063be5a02b89e

Commit: 8c83281399d013aab4415b4e425063be5a02b89e

Tree: 5b7585ff5f0d641617d1d91da4adc936e787d64f

Author: Cole Miller

Committer: GitHub

## Message

```
acp: Fix read_file tool flickering (#36854)

We were rendering a Markdown link like `[Read file x.rs (lines
Y-Z)](@selection)` while the tool ran, but then switching to just `x.rs`
as soon as we got the file location from the tool call (due to an
if/else in the UI code that applies to all tools). This caused a
flicker, which is fixed by having `initial_title` return just the
filename from the input as it arrives instead of a link that we're going
to stop rendering almost immediately anyway.

Release Notes:

- N/A
```

## Parents

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

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