Gate sandboxed terminal tempdir to local projects (#58240)

[PR #57878](https://github.com/zed-industries/zed/pull/57878) introduced
a per-thread sandboxing temp directory that, for every terminal command,
overrode `TMPDIR`/`TMP`/`TEMP` and pushed the directory into the sandbox
writable scope. For remote projects this temp directory is created on
the client while the terminal actually runs on the remote host, so it
leaked client-side environment variables into the remote terminal and
pointed `$TMPDIR` at a path that doesn't exist there.

This gates the temp-directory logic behind `project.is_local()`, so
remote projects no longer get their terminal environment infected. This
doesn't restore the per-thread tempdir behavior for remoting, but it
undoes the regression.

Closes AI-348

Release Notes:

- Fixed remote terminals having their environment overridden by
client-side temp directory variables
513e2b2ee3Richard Feldman committed on 6/1/2026, 3:59:58 PM· committed by GitHubparent7e6e731
1 file changedLine totals unavailable