# agent_ui: Fix agent panel insertion to use cursor position \(\#38253\) · gitcafe/zed

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

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

Visibility: public

Requested revision: 5d561aa494d764ada3feaf9e8bb7e789fda292d1

Requested commit: 5d561aa494d764ada3feaf9e8bb7e789fda292d1

Commit: 5d561aa494d764ada3feaf9e8bb7e789fda292d1

Tree: f08ec3d2ed0f604ff1232418b57857520881a8e1

Author: Kyrilasa

Committer: GitHub

## Message

```
agent_ui: Fix agent panel insertion to use cursor position (#38253)

Fix agent panel insertion to use cursor position

Closes #38216

Release Notes:
- Fixed agent panel text insertion to respect cursor position instead of
always appending to the end

## Before

[before.webm](https://github.com/user-attachments/assets/684d3cbe-4710-4724-8d2d-ac08f430dea8)

## After

[output.webm](https://github.com/user-attachments/assets/d1122d99-4efb-4a24-a408-db128814f98c)
```

## Parents

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

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