Commit graph

156 commits

Author SHA1 Message Date
Joseph T. Lyons
011bbf76a6
Add support for custom git commands in the git graph context menu (#56354)
This PR adds support to create custom git task that are triggered from
the git graph context menu. Both Sublime Merge and Fork have custom
command support, and I use custom commands I've built out frequently to
speed up some of my tasks at Zed. Thus, I'd like to have support in
Zed's git graph so I can use Zed even more!

It offers initial support for the following env variables:

- `ZED_GIT_SHA`
- `ZED_GIT_SHA_SHORT`
- `ZED_GIT_REPOSITORY_NAME`
- `ZED_GIT_REPOSITORY_PATH`

These are only populated in the git graph context.

This PR also introduces a the `git-command` tag, which is needed so the
git graph can filter down to these custom git commands, and so other
tasks aren't polluting the context menu.

An example would be (in the global `tasks.json`):

```json
{
  "label": "Branches containing commit: $ZED_GIT_SHA_SHORT",
  "command": "git",
  "args": ["branch", "-a", "--contains", "$ZED_GIT_SHA"],
  "tags": ["git-command"],
},
```

And then in the context menu:

<img width="646" height="296" alt="SCR-20260511-mnfa"
src="https://github.com/user-attachments/assets/0e7b811b-f47d-4a2f-9270-99e392c38663"
/>

And the output in the terminal:

<img width="585" height="184" alt="SCR-20260511-mnks"
src="https://github.com/user-attachments/assets/54d7d205-6212-4eff-8dbb-c8e908996747"
/>

The awesome thing about using tasks is we get all the task
infrastructure for free, such as history!

<img width="591" height="292" alt="SCR-20260511-mnud"
src="https://github.com/user-attachments/assets/6315be8f-dd33-470f-bfcd-aa56d7fbfdce"
/>

<img width="602" height="173" alt="SCR-20260511-moch"
src="https://github.com/user-attachments/assets/b528422c-efcc-4a7d-9783-73d945e9665b"
/>

And we have all the task configuration options too out of the box.

---

Right now, this only works with global tasks. It isn't clear how to shoe
in support for worktree-specific tasks (`.zed/tasks.json`) in a clear
way, as not all invocations of the git graph are in an area that has a
clear worktree id, and so we sort of have to guess or fallback to
something else. That can be a followup once it's more clear how we
should cover that. Or maybe someone else has a better solution.

I chose to only ship with these 4 git-specific variables for now. The
git graph also currently ONLY resolve those variables. We can adjust /
add in more in follow up PRs.

Self-Review Checklist:

- [X] I've reviewed my own diff for quality, security, and reliability
- [X] Unsafe blocks (if any) have justifying comments
- [X] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [X] Tests cover the new/changed behavior
- [X] Performance impact has been considered and is acceptable

Release Notes:

- Added support for running global custom Git command tasks from the Git
Graph commit context menu.
2026-05-12 16:20:53 +00:00
Conrad Irwin
be705e677b
Merge gpui::Task and scheduler::Task (#53674)
Release Notes:

- N/A or Added/Fixed/Improved ...
2026-05-05 22:41:13 +00:00
moktamd
5aa7eaa508
dap: Support IPv6 addresses in TCP transport (#52244)
The DAP TCP transport layer was hardcoded to `Ipv4Addr`, so IPv6
addresses like `fd00::a` in a debug config's `connect.host` always
failed with `hostname must be IPv4: invalid IPv4 address syntax`.

Replaced `Ipv4Addr` with `IpAddr` and `SocketAddrV4` with `SocketAddr`
across the `task`, `dap`, `dap_adapters`, and `project` crates. The WASM
extension API still uses `u32` for the host field to avoid a breaking
WIT interface change; IPv4 round-trips through extensions as before.

Fixes #52237

Release Notes:

- Fixed DAP TCP transport rejecting IPv6 addresses when connecting to
remote debug adapters.

---------

Co-authored-by: moktamd <moktamd@users.noreply.github.com>
2026-04-27 08:42:45 +00:00
Justin Su
a7248e8c00
Don't save buffers by default when running tasks (#52976)
Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Closes #52926
Follow-up to #48861
cc @SomeoneToIgnore

Release Notes:

- Edited buffers are no longer saved by default before running a task,
but you can still configure this using the "save" field in `tasks.json`.

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2026-04-02 13:09:29 +00:00
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
Andrei Benea
0698eccebb
Save edited buffers before running a task (#48861)
Save edited buffers before running a task

Introduces a new task field for configuring which buffers are saved. For
now, this defaults to saving all buffers, but in the future we could
have a global task template to configure this setting for dynamically
created tasks.

Needed for #10251.

Release Notes:

- Edited buffers are now saved before running a task. This can be
configured with the new "save" field in `tasks.json`.

---------

Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2026-03-19 08:42:28 +00:00
Matt Van Horn
83adaa52b3
task: Expose current buffer language as $ZED_LANGUAGE variable (#51614)
Closes #12628

Adds a `$ZED_LANGUAGE` task variable that resolves to the language name
of the active buffer (e.g., "Rust", "Python", "Shell Script"). This lets
tasks adapt behavior based on language without parsing file extensions.

Use cases from the issue:
- Pass syntax highlighting language to external tools (e.g., `rg --type
$ZED_LANGUAGE`)
- Adjust comment wrapping width per language
- Handle extensionless files and untitled buffers that have a language
assigned

VS Code provides equivalent functionality via
`${command:activeEditorLanguageId}`. Neovim exposes it as `&filetype`.

## Changes

- Added `Language` variant to `VariableName` in
`crates/task/src/task.rs`
- Populated from `buffer.language().name()` in
`BasicContextProvider::build_context`
(`crates/project/src/task_inventory.rs`), following the same pattern as
`File` and `Stem`
- Updated test fixtures in `crates/tasks_ui/src/tasks_ui.rs` to include
the new variable
- Added `ZED_LANGUAGE` to the variable list in `docs/src/tasks.md`

## Testing

Updated the existing `test_task_variables` test in `tasks_ui` to verify
`ZED_LANGUAGE` resolves to "Rust" and "TypeScript" for the respective
test buffers.

This contribution was developed with AI assistance (Claude Code).

Release Notes:

- Added `$ZED_LANGUAGE` task variable that exposes the current buffer's
language name

---------

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-authored-by: Kirill Bulatov <mail4score@gmail.com>
2026-03-17 18:04:04 +02:00
Finn Evers
8475280eb1
extension_cli: Add tests for semantic token rules and language tasks (#50750)
This adds checks to the extension CLI to ensure that tasks and semantic
token rules are actually valid for the compiled extensions.

Release Notes:

- N/A
2026-03-09 11:47:12 +01:00
Daniel Strobusch
71de6edd93 Fix VSCode tasks.json parsing for tasks without explicit labels (#47754)
Implements automatic label generation for VSCode tasks that don't have
explicit 'label' fields, matching VSCode's behavior.

Changes:
- Made label field optional in VsCodeTaskDefinition deserialization
- Implemented custom deserializer to auto-generate labels:
  - npm tasks: 'npm: {script}' (e.g., 'npm: start')
  - shell tasks: first word of command (e.g., 'echo')
  - gulp tasks: 'gulp: {task}' (e.g., 'gulp: build')
  - fallback: 'Untitled Task'
- Added test data file with tasks without labels
- Added test cases

Closes #47749

Release Notes:

- Fixed: VSCode tasks.json files with tasks missing explicit `label`
fields now parse correctly. Labels are auto-generated matching VSCode's
behavior (e.g., "npm: start").
2026-02-12 16:30:47 +00:00
Xiaobo Liu
92f8ae8635
debugger: Wrap TaskContext in Arc to reduce cloning overhead (#47087)
Release Notes:

- N/A

---------

Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Co-authored-by: Anthony Eid <anthony@zed.dev>
2026-02-05 10:37:39 +00:00
Joseph T. Lyons
72b151e3aa
Revert "Allow always_allow patterns for Nushell, Elvish, and Rc shells" (#48050)
Reverts zed-industries/zed#47908

This PR inadvertently caused a regression:

- https://github.com/zed-industries/zed/issues/48047
2026-01-30 21:26:13 +00:00
Richard Feldman
b7e11b38f4
Allow always_allow patterns for Nushell, Elvish, and Rc shells (#47908)
## Summary

This PR extends the `always_allow` tool permission patterns to work with
Nushell, Elvish, and Rc shells. Previously, these shells were
incorrectly excluded because they don't use `&&`/`||` operators for
command chaining. However, brush-parser can safely parse their command
syntax since they all use `;` for sequential execution.

## Changes

- Add `ShellKind::Nushell`, `ShellKind::Elvish`, and `ShellKind::Rc` to
`supports_posix_chaining()`
- Split `ShellKind::Unknown` into `ShellKind::UnknownWindows` and
`ShellKind::UnknownUnix` to preserve platform-specific fallback behavior
while still denying `always_allow` patterns for unrecognized shells
- Add comprehensive tests for the new shell support
- Clarify documentation about shell compatibility

## Shell Notes

- **Nushell**: Uses `;` for sequential execution. The `and`/`or`
keywords are boolean operators on values, not command chaining.
- **Elvish**: Uses `;` to separate pipelines. Does not have `&&` or `||`
operators. Its `and`/`or` are special commands operating on values.
- **Rc (Plan 9)**: Uses `;` for sequential execution and `|` for piping.
Does not have `&&`/`||` operators.

## Security

Unknown shells still return `false` from `supports_posix_chaining()`, so
`always_allow` patterns are denied for safety when we can't verify the
shell's syntax.

(No release notes because granular tool permissions are still
feature-flagged.)

Release Notes:

- N/A

---------

Co-authored-by: Zed Zippy <234243425+zed-zippy[bot]@users.noreply.github.com>
2026-01-29 06:08:05 +00:00
Karl-Erik Enkelmann
9d5f0f5aaf
tasks: Show error for unknown ZED_ variables (#45621)
Validate task variable names when the file is saved, immediately
displaying an error toast if any invalid `ZED_*` variables are found.
Valid tasks in the same file are still loaded and work normally.

- Add `task::task_template::TaskTemplate::unknown_variables()` to detect
  invalid `ZED_` variable names
- Add `project::ToastLink` struct and optional `link` field to
  `project::Event::Toast`
- Show documentation link in the error toast

Closes #23275

Release Notes:

- Fixed user-defined tasks with unresolved `ZED_*` variables being
silently omitted

---------

Co-authored-by: dino <dinojoaocosta@gmail.com>
2026-01-26 19:47:36 +00:00
Ian Chamberlain
cd8679e81a
Allow trailing commas in builtin JSONC schemas (#43854)
The JSON language server looks for a top-level `allowTrailingCommas`
flag to decide whether it should warn for trailing commas. Since the
JSONC parser for these builtin files can handles trailing commas, adding
this flag to the schema also prevents a warning for those commas.

I don't think there's an issue that is only for this specific issue, but
it relates to *many* existing / older issues:
- #18509
- #17487
- #40970
- #18509
- #21303

Release Notes:

- Suppress warning for trailing commas in builtin JSON files
(`settings.json`, `keymap.json`, etc.)
2025-12-04 15:37:32 -05:00
Anthony Eid
56401fc99c
debugger: Allow users to include PickProcessId in debug tasks and resolve Pid (#42913)
Closes #33286

This PR adds support for Zed's `$ZED_PICK_PID` command in debug
configurations, which allows users to select a process to attach to at
debug time. When this variable is present in a debug configuration, Zed
automatically opens a process picker modal.

Follow up for this will be integrating this variable in the task system
instead of just the debug configuration system.

Release Notes:

- Added `$ZED_PICK_PID` variable for debug configurations, allowing
users to select which process to attach the debugger to at runtime

---------

Co-authored-by: Remco Smits <djsmits12@gmail.com>
2025-11-20 10:12:59 -05:00
Jakub Konka
bcbc6a330e
Use ShellKind::try_quote whenever we need to quote shell args (#41104)
Re-reverts
8f4646d6c3
with fixes

Release Notes:

- N/A
2025-10-24 18:19:53 +02:00
Jakub Konka
023ac1b649
Revert "Use ShellKind::try_quote whenever we need to quote shell args" (#41022)
Reverts zed-industries/zed#40912

Closes https://github.com/zed-industries/zed/issues/41010
2025-10-23 16:06:47 +00:00
Jakub Konka
8f4646d6c3
Use ShellKind::try_quote whenever we need to quote shell args (#40912)
Using `shlex` unconditionally is dangerous as it assumes the underlying
shell is POSIX which is not the case for PowerShell, CMD, or Nushell.
Therefore, whenever we want to quote the args we should utilise our
helper `util:🐚:ShellKind::try_quote` which takes into account
which shell is being used to actually exec/spawn the invocation.

Release Notes:

- N/A

---------

Co-authored-by: Lukas Wirth <me@lukaswirth.dev>
2025-10-23 06:44:42 +02:00
Julia Ryan
ef5b8c6fed
Remove workspace-hack (#40216)
We've been considering removing workspace-hack for a couple reasons:
- Lukas ran into a situation where its build script seemed to be causing
spurious rebuilds. This seems more likely to be a cargo bug than an
issue with workspace-hack itself (given that it has an empty build
script), but we don't necessarily want to take the time to hunt that
down right now.
- Marshall mentioned hakari interacts poorly with automated crate
updates (in our case provided by rennovate) because you'd need to have
`cargo hakari generate && cargo hakari manage-deps` after their changes
and we prefer to not have actions that make commits.

Currently removing workspace-hack causes our workspace to grow from
~1700 to ~2000 crates being built (depending on platform), which is
mainly a problem when you're building the whole workspace or running
tests across the the normal and remote binaries (which is where
feature-unification nets us the most sharing). It doesn't impact
incremental times noticeably when you're just iterating on `-p zed`, and
we'll hopefully get these savings back in the future when
rust-lang/cargo#14774 (which re-implements the functionality of hakari)
is finished.

Release Notes:

- N/A
2025-10-17 18:58:14 +00:00
Cole Miller
dac5725246
windows: Fix semantic merge conflict with ShellKind::new (#40107)
Release Notes:

- N/A
2025-10-13 14:30:40 +00:00
Marco Mihai Condrache
02bdba80a4
util: Fix shell kind in windows based on program path (#39696)
Closes #39614

The `ShellKind` struct is built on Windows' side, meaning that when
connecting to remotes, we fall back to PowerShell construction, even if
the shell program we are spawning is a unix program.

This broke tasks creation since we are using the shell kind to construct
args:


d04ac864b8/crates/project/src/terminals.rs (L149)

In normal terminals this only affected activation scripts (only place
where shell kind is used)

I don't have a Windows machine to test it, so I would appreciate any
help with testing!

Release Notes:

- Fixed an issue where tasks could not be executed in Windows WSL

---------

Signed-off-by: Marco Mihai Condrache <52580954+marcocondrache@users.noreply.github.com>
2025-10-13 15:45:46 +02:00
Cole Miller
92e765b5d2
windows: Add support for fetching shell environment in remote projects (#39831)
Closes #39216

Note that this affects all platforms, I'm just using the prefix to make
auto-cherry-picking easier.

Release Notes:

- Fixed shell commands run by agents failing to find installed programs
in some cases.
2025-10-12 23:31:40 +00:00
Kevin Rambaud
63032f6c66
Fix redirect stdin command for fish shell (#39963)
This fixes an issue introduced via
[v0.208.0-pre](https://github.com/zed-industries/zed/releases/tag/v0.208.0-pre)
and reported via
https://github.com/zed-industries/zed/issues/34530#issuecomment-3386042577
where, when using fish shell as the default shell and using a Claude
Code thread in Zed, all command were failing because `(command)` in fish
is for command substitution. Using it creates this type of error:

```
fish: command substitutions not allowed in command position. Try var=(your-cmd) $var ...
(npm ci) </dev/null
^~~~~~~~~~~~^
```

or in the editor itself:

<img width="1624" height="1060" alt="image"
src="https://github.com/user-attachments/assets/64fc3126-2cdd-450e-bc85-ef91c56b3705"
/>


Using the appropriate syntax to redirect to stdin for fish fixes the
issue.

Release Notes:

- Fixed redirect stdin command for fish shell
2025-10-10 16:21:48 +00:00
Merlin04
37d676e2c6
Add support for xonsh shell (#39834)
Closes #39506

Release Notes:

- Fixed environment variable capture when login shell is
[xonsh](https://xon.sh/)

---------

Co-authored-by: Jakub Konka <kubkon@jakubkonka.com>
2025-10-09 12:00:22 +02:00
Jakub Konka
4684d6b50e
terminal: Fix escaping arguments when using CMD as the shell (#39701)
A couple of caveats:
- We should not auto-escape arguments with Alacritty's `escape_args`
option if using CMD otherwise, the generated command will have way too
many escaped characters for CMD to parse correctly.
- When composing a full command for CMD, we need to put it in double
quotes manually: `cmd /C "activate.bat& pwsh.exe -C do_something"` so
that CMD executes the entire string as a sequence of commands.
- CMD requires `&` as a chaining operator for commands (`;` for other
shells).

Release Notes:

- N/A
2025-10-08 16:44:04 +00:00
Lukas Wirth
2859cbdba9
Make ShellBuilder::new not branch on a remote shell (#39493)
Release Notes:

- Fixed claude code agent login on remotes

Co-authored-by: Max Brunsfeld <max@zed.dev>
Co-authored-by: Cole Miller <cole@zed.dev>
2025-10-03 23:23:09 +02:00
Lukas Wirth
bf48a95344
acp_thread: Respect terminal settings shell for terminal tool environment (#39349)
When sourcing the project environment for the terminal tool, we will now
do so by spawning the shell specified by the users `terminal.shell`
setting (or as usual fall back to the login shell).

Closes #37687 

Release Notes:

- N/A
2025-10-02 22:10:55 +02:00
Cole Miller
dd6c653fe9
agent: Fix terminal tool on Windows (#39260)
Seems like we don't want to escape the dollar sign in `$null`.

Release Notes:

- N/A
2025-09-30 23:19:32 -04:00
Lukas Wirth
67ebb1f795
task: Fix ShellBuilder::redirect_stdin_to_dev_null constructing invalid commands on windows (#39227)
Release Notes:

- Fixed agents not being able to use the terminal tool with powershell

Co-authored-by: Cole Miller <cole@zed.dev>
2025-09-30 17:55:46 +00:00
Lukas Wirth
0a10e3e264
acp_thread: Fix terminal tool incorrectly redirecting stdin to /dev/null (#39092)
Closes https://github.com/zed-industries/zed/issues/38462

Release Notes:

- Fixed AI terminal tool incorrectly redirecting stdin to `/dev/null`
2025-09-29 09:43:50 +00:00
Ben Kunkle
4aac5642c1
JSON Schema URIs (#38916)
Closes #ISSUE

Improves the efficiency of our interactions with the Zed language
server. Previously, on startup and after every workspace configuration
changed notification, we would send >1MB of JSON Schemas to the JSON
LSP. The only reason this had to happen was due to the case where an
extension was installed that would result in a change to the JSON schema
for settings (i.e. added language, theme, etc).

This PR changes the behavior to use the URI LSP extensions of
`vscode-json-language-server` in order to send the server URI's that it
can then use to fetch the schemas as needed (i.e. the settings schema is
only generated and sent when `settings.json` is opened. This brings the
JSON we send to on startup and after every workspace configuration
changed notification down to a couple of KB.

Additionally, using another LSP extension request we can notify the
server when a schema has changed using the URI as a key, so we no longer
have to send a workspace configuration changed notification, and the
schema contents will only be re-requested and regenerated if the schema
is in use.

Release Notes:

- Improved the efficiency of communication with the builtin JSON LSP.
JSON Schemas are no longer sent to the JSON language server in their
full form. If you wish to view a builtin JSON schema in the language
server info tab of the language server logs (`dev: open language server
logs`), you must now use the `editor: open url` action with your cursor
over the URL that is sent to the server.
- Made it so that Zed urls (`zed://...`) are resolved locally when
opened within the editor instead of being resolved through the OS. Users
who could not previously open `zed://*` URLs in the editor can now do so
by pasting the link into a buffer and using the `editor: open url`
action (please open an issue if this is the case for you!).

---------

Co-authored-by: Michael <michael@zed.dev>
2025-09-26 11:41:26 -04:00
Kirill Bulatov
d8048f46ee
Test task shell commands (#38706)
Add tests on task commands, to ensure things like
https://github.com/zed-industries/zed/issues/38343 do not come so easily
unnoticed and to provide a base to create more tests in the future, if
needed.

Release Notes:

- N/A

---------

Co-authored-by: Lukas Wirth <lukas@zed.dev>
2025-09-23 11:12:39 +00:00
Piotr Osiewicz
a90abb1009
Bump Rust to 1.90 (#38436)
Release Notes:

- N/A

---------

Co-authored-by: Nia Espera <nia@zed.dev>
Co-authored-by: Julia Ryan <juliaryan3.14@gmail.com>
2025-09-22 14:36:10 -07:00
Lukas Wirth
92b946e8e5
acp_thread: Properly use project terminal API (#38186)
Closes https://github.com/zed-industries/zed/issues/35603

Release Notes:

- Fixed shell selection for terminal tool
2025-09-15 12:43:41 +00:00
Lukas Wirth
e68aa18fd4
project: Fix task arguments being quoted incorrectly for nushell and powershell (#38056)
Release Notes:

- Fixed task arguments being quoted incorrectly for nushell and
powershell

Co-authored-by: Piotr Osiewicz <piotr@zed.dev>
2025-09-12 12:02:39 +00:00
Isaac Hales
74e8afe9a8
Fix logic for default values for task variables (#37588)
This is a small fix for default values in task variables. The
[documentation](https://zed.dev/docs/tasks) states

> You can also use verbose syntax that allows specifying a default if a
given variable is not available: ${ZED_FILE:default_value}

I found, however, that this doesn't actually work. Instead, the Zed
variable and the default value are just appended in the output. For
example, if I run a task `echo ${ZED_ROW:100}` the result I get is
`447:100` (in this case it should just be `447`).

This PR fixes that. I also added a new test case for handling default
values.
I also tested the fix in a dev build and it seems to work.

There are no UI adjustments.

AI disclosure: I used Claude Code to write the code, including the fix
and the tests.

This is actually my first open-source PR ever, so if I did something
wrong, I'd appreciate any tips and I'll make it right!


Release Notes:

- Fixed task variable substitution always appending the default
2025-09-05 14:57:58 +00:00
Lukas Wirth
835e5ba662
Inject venv environment via the toolchain (#36576)
Instead of manually constructing the venv we now ask the python
toolchain for the relevant information, unifying the approach of vent
inspection

Fixes https://github.com/zed-industries/zed/issues/27350

Release Notes:

- Improved the detection of python virtual environments for terminals
and tasks in remote projects.
2025-08-28 14:40:43 +00:00
Max Brunsfeld
1eae76e856
Restructure remote client crate, consolidate SSH logic (#36967)
This is a pure refactor that consolidates all SSH remoting logic such
that it should be straightforward to add another transport to the
remoting system.

Release Notes:

- N/A

---------

Co-authored-by: Mikayla Maki <mikayla.c.maki@gmail.com>
2025-08-27 00:15:39 +00:00
Lukas Wirth
b284b1a0b8
remote: Fetch shell on ssh remote to use for preparing commands (#36690)
Prerequisite for https://github.com/zed-industries/zed/pull/36576 to
allow us to differentiate the shell in a remote.

Release Notes:

- N/A
2025-08-21 19:08:26 +02:00
tidely
7bdc99abc1
Fix clippy::redundant_clone lint violations (#36558)
This removes around 900 unnecessary clones, ranging from cloning a few
ints all the way to large data structures and images.

A lot of these were fixed using `cargo clippy --fix --workspace
--all-targets`, however it often breaks other lints and needs to be run
again. This was then followed up with some manual fixing.

I understand this is a large diff, but all the changes are pretty
trivial. Rust is doing some heavy lifting here for us. Once I get it up
to speed with main, I'd appreciate this getting merged rather sooner
than later.

Release Notes:

- N/A
2025-08-20 12:20:13 +02:00
Piotr Osiewicz
cf7c64d77f
lints: A bunch of extra style lint fixes (#36568)
- **lints: Fix 'doc_lazy_continuation'**
- **lints: Fix 'doc_overindented_list_items'**
- **inherent_to_string and io_other_error**
- **Some more lint fixes**
- **lints: enable bool_assert_comparison, match_like_matches_macro and
wrong_self_convention**


Release Notes:

- N/A
2025-08-20 12:05:58 +02:00
Piotr Osiewicz
6825715503
Another batch of lint fixes (#36521)
- **Enable a bunch of extra lints**
- **First batch of fixes**
- **More fixes**

Release Notes:

- N/A
2025-08-19 20:33:44 +00:00
Piotr Osiewicz
8f567383e4
Auto-fix clippy::collapsible_if violations (#36428)
Release Notes:

- N/A
2025-08-19 13:27:24 +00:00
Piotr Osiewicz
9e0e233319
Fix clippy::needless_borrow lint violations (#36444)
Release Notes:

- N/A
2025-08-18 21:54:35 +00:00
Anthony Eid
bcac748c2b
Add support for Nushell in shell builder (#33806)
We also swap out env variables before sending them to shells now in the
task system. This fixed issues Fish and Nushell had where an empty
argument could be sent into a command when no argument should be sent.
This only happened from task's generated by Zed.

Closes #31297 #31240

Release Notes:

- Fix bug where spawning a Zed generated task or debug session with Fish
or Nushell failed
2025-07-08 14:57:37 +00:00
Piotr Osiewicz
4693f16759
debugger: Remove PHP debug adapter (#34020)
This commit removes the PHP debug adapter in favor of a new version
(0.3.0) of PHP extension.
The name of a debug adapter has been changed from "PHP" to "Xdebug",
which makes this a breaking change in user-configured scenarios

Release Notes:

- debugger: PHP debug adapter is no longer shipped in core Zed editor;
it is now available in PHP extension (starting with version 0.3.0). The
adapter has been renamed from `PHP` to `Xdebug`, which might break your
user-defined debug scenarios.
2025-07-08 01:36:32 +02:00
Remco Smits
01295aa687
debugger: Fix the JavaScript debug terminal scenario (#33924)
There were a couple of things preventing this from working:

- our hack to stop the node REPL from appearing broke in recent versions
of the JS DAP that started passing `--experimental-network-inspection`
by default
- we had lost the ability to create a debug terminal without specifying
a program

This PR fixes those issues. We also fixed environment variables from the
**runInTerminal** request not getting passed to the spawned program.

Release Notes:

- Debugger: Fix RunInTerminal not working for JavaScript debugger.

---------

Co-authored-by: Cole Miller <cole@zed.dev>
2025-07-05 19:48:55 -04:00
Michael Sloan
ed7552d3e3
Default `#[schemars(deny_unknown_fields)] for json-language-server schemas (#33883)
Followup to #33678, doing the same thing for all JSON Schema files
provided to json-language-server

Release Notes:

* Added warnings for unknown fields when editing `tasks.json` /
`snippets.json`.
2025-07-04 00:57:43 +00:00
Michael Sloan
7a2593e520
Fix JSON Schema definitions path used for debug task (#33873)
Regression in #33678

Release Notes:

- (Preview Only) Fixed invalid json schema for `debug.json`.
2025-07-03 21:04:33 +00:00
Kirill Bulatov
48c8555076
Show more info in the UI and logs (#33841)
Addresses the `The binding is not displayed, though:` part from
https://github.com/zed-industries/zed/discussions/29498#discussioncomment-13649543

Release Notes:

- N/A
2025-07-03 09:15:50 +00:00