zed/crates/task/src
Anthony Eid efb12d2721
git: Add create git worktree hook to task system (#51337)
### Summary

This PR starts work on adding basic hook support in the `TaskStore`. To
enable users to setup tasks that are ran when the agent panel creates a
new git worktree to start a thread in. It also adds a new task variable
called `ZED_MAIN_GIT_WORKTREE` that's the absolute path to the main repo
that the newly created linked worktree is based off of.

### Follow Ups 

- Get this hook working with the git worktree picker as well
- Make a more general approach to the hook system in `TaskStore`
- Add `ZED_PORT_{1..10}` task variables
- Migrate the task context creation code from `task_ui` to the basic
context provider

Before you mark this PR as ready for review, make sure that you have:
- [ ] Added a solid test coverage and/or screenshots from doing manual
testing
- [x] Done a self-review taking into account security and performance
aspects
- [x] Aligned any UI changes with the [UI
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)

Release Notes:

- N/A *or* Added/Fixed/Improved ...

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
2026-04-01 16:14:48 -04:00
..
adapter_schema.rs Default `#[schemars(deny_unknown_fields)] for json-language-server schemas (#33883) 2025-07-04 00:57:43 +00:00
debug_format.rs Allow trailing commas in builtin JSONC schemas (#43854) 2025-12-04 15:37:32 -05:00
serde_helpers.rs Migrate to schemars version 1.0 (#33635) 2025-06-30 21:07:28 +00:00
static_source.rs Fix clippy::redundant_clone lint violations (#36558) 2025-08-20 12:20:13 +02:00
task.rs git: Add create git worktree hook to task system (#51337) 2026-04-01 16:14:48 -04:00
task_template.rs git: Add create git worktree hook to task system (#51337) 2026-04-01 16:14:48 -04:00
vscode_debug_format.rs debugger: Allow users to include PickProcessId in debug tasks and resolve Pid (#42913) 2025-11-20 10:12:59 -05:00
vscode_format.rs Fix VSCode tasks.json parsing for tasks without explicit labels (#47754) 2026-02-12 16:30:47 +00:00