# agent_ui: Fix token count not getting shown in the TextThread \(\#34485\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 875c86e3ef30937f07b2db5324bf16331695f39b

Requested commit: 875c86e3ef30937f07b2db5324bf16331695f39b

Commit: 875c86e3ef30937f07b2db5324bf16331695f39b

Tree: e9df94a9daab36335f8ca11403c897af26178108

Author: Umesh Yadav

Committer: GitHub

## Message

```
agent_ui: Fix token count not getting shown in the TextThread (#34485)

Closes #34319 

In this pr: https://github.com/zed-industries/zed/pull/33462 there was
check added for early return for active_thread and message_editor as
those are not present in the TextThread and only available in the Thread
the token count was not getting triggered for TextThread this pr fixes
that regression by moving the logic specific to Thread inside of thread
view match.

<img width="3024" height="1886" alt="CleanShot 2025-07-15 at 23 50
18@2x"
src="https://github.com/user-attachments/assets/bd74ae8b-6c37-4cdd-ab95-d3c253b8a948"
/>


Release Notes:

- Fix token count not getting shown in the TextThread
```

## Parents

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

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