# agent_ui: Fix \`project path not found\` error when pasting code from other project \(\#44555\) · gitcafe/zed

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

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

Visibility: public

Requested revision: f5babf96e1682c16a9dc2356d1aaa31df185fe7f

Requested commit: f5babf96e1682c16a9dc2356d1aaa31df185fe7f

Commit: f5babf96e1682c16a9dc2356d1aaa31df185fe7f

Tree: 99aacd8084e7f0c08933ae6c33b2c3c87647206e

Author: Bennet Bo Fenner

Committer: GitHub

## Message

```
agent_ui: Fix `project path not found` error when pasting code from other project (#44555)

The problem with inserting the absolute paths is that the agent will try
to read them. However, we don't allow the agent to read files outside
the current project. For now, we will only insert the crease in case the
code that is getting pasted is from the same project

Release Notes:

- Fixed an issue where pasting code into the agent panel from another
window would show an error
```

## Parents

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

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