Skip to content

Tags: jamilahmadzai/zed

Tags

nightly

Toggle nightly's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
agent: Make messages vec cheap to clone (zed-industries#57712)

For long threads we will spend more and more time cloning the messages
just to save them to the database, as we need a copy of everything to do
so asynchronously. Messages are really expensive to clone though and we
accumulate a lot of them really fast, so even for smaller threads we
start seeing pauses in the millisecond range. The fix to this is fairly
simple though, we never mutate the messages once pushed to the vec, so
just Arc them.

This PR also slightly changes `UserMessage` to be a bit faster to clone
as well.

Release Notes:

- Fixed a cause of stutters when interacting with the agent

v1.4.2-pre

Toggle v1.4.2-pre's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump to 1.4.2 for @maxbrunsfeld

v1.3.7

Toggle v1.3.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump to 1.3.7 for @maxbrunsfeld

collab-staging

Toggle collab-staging's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Fix git hang caused by accidental inheritance of stdin FD (zed-indust…

…ries#57572)

When restarting Zed, I hit a bug where all Git operations were hung. I
realized that there was a hanging git process running `git cat-file
--batch-check=%(objectname)`. The process was waiting on stdin. This was
surprising, because [the
code](https://github.com/zed-industries/zed/blob/e2bbdb19b6da2ee157ca1d36100acde2134a1663/crates/git/src/repository.rs#L1665-L1709)
that spawns this process explicitly closes the pipe that is attached to
the process's stdin after writing a list of ref names.

Using Claude, I found that this could be caused by that pipe file
descriptor being cloned due to file descriptor inheritance when another
child process is `exec`'d while that stdin pipe is open. The fix is to
enhance our Darwin process spawning layer to set the close-on-exec flag
for the pipe file descriptors, so that they are not inherited by child
processes spawned using code paths that don't set
`POSIX_SPAWN_CLOEXEC_DEFAULT`.

Release Notes:

- Fixed a bug on macOS where Git operations could be blocked depending
on the timing of spawning child processes.

v1.4.1-pre

Toggle v1.4.1-pre's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump to 1.4.1 for @probably-neb

v1.3.6

Toggle v1.3.6's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump to 1.3.6 for @probably-neb

v1.4.0-pre

Toggle v1.4.0-pre's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
v1.4.x preview for @JosephTLyons

v1.3.5

Toggle v1.3.5's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
v1.3.x stable for @JosephTLyons

v1.3.5-pre

Toggle v1.3.5-pre's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump to 1.3.5 for @cole-miller

v1.2.7

Toggle v1.2.7's commit message

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
Bump to 1.2.7 for @cole-miller