# Improve Zed tasks' \`ZED_WORKTREE_ROOT\` fallbacks \(\#25605\) · gitcafe/zed

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

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

Visibility: public

Requested revision: b5a1ae65266d2cb6363775c2212d4a56e9adfb78

Requested commit: b5a1ae65266d2cb6363775c2212d4a56e9adfb78

Commit: b5a1ae65266d2cb6363775c2212d4a56e9adfb78

Tree: b0b64eaeac9c5609525211c7bc5da7d484b0d94e

Author: Kirill Bulatov

Committer: GitHub

## Message

```
Improve Zed tasks' `ZED_WORKTREE_ROOT` fallbacks (#25605)

Closes https://github.com/zed-industries/zed/issues/22912

Reworks the task context infrastructure so that it's possible to have
multiple contexts at the same time, and stores all possible worktree
context there.
Task UI code is now falling back to the "active" worktree context, if
active item's context did not produce a resolved task.

Current code does not produce meaningful results for projects with
multiple worktrees to avoid ambiguity and design changes: instead of
resolving tasks per worktree context available, extra worktree context
is only used when resolving tasks from the same worktree.

Release Notes:

- Improved Zed tasks' `ZED_WORKTREE_ROOT` fallbacks
```

## Parents

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

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