This PR makes the worktree's change events more useful in a few ways:
* The changes are now described by a cheaply clone-able collection, so
that they can be used in background tasks. Right now, I'm using a simple
Arc slice.
* The `UpdatedEntries` event now captures not only changes due to FS
changes, but also newly-loaded paths that are discovered during the
initial scan.
* The `UpdatedGitRepositories` event now includes repositories whose
work-dir changed but git dir didn't change. A boolean flag is included,
to indicate whether the git content changed.
* The `UpdatedEntries` and `UpdatedGitRepositories` events are now
*used* to compute the worktree's `UpdateWorktree` messages, used to sync
changes to guests. This unifies two closely-related code paths, and
makes the host more efficient when collaborating, because the
`UpdateWorktree` message computation used to require walking the entire
`entries` tree on every FS change.
We don't need to look-up change types by an arbitrary key, but we
do need to iterate it. It would also be useful to be able to
cheaply clone the changes, to use them in a background task.
This took so much longer than I wanted, so glad to finally be rid of
this
Release Notes:
* Improved performance when editing many git-tracked files in a
multi-buffer at the same time
This avoids an issue where in a many-buffer multi-buffer, each modified
buffer could complete its recalc independently, causing a cascade of
repeated notifies
Now all recalcs started at the same time must complete before
A: Starting another recalc pass
B: The master notify occurring
Each buffer can still show its new diff if something else triggers it
to notify earlier, this is desirable and does not have the same negative
effects as the notify cascade as those re-layouts would need to happen
anyway
Co-Authored-By: Max Brunsfeld <max@zed.dev>
For some reason the yellow I used for the modified color in light themes
was really light
.
Release Notes:
* Improved the contrast of diff modified color in the editor in light
themes.
This adds basic ability to interact with OpenAI inside a buffer.
Release Notes:
* If`OPENAI_API_KEY` is defined in your environment, you can now run the
`ai: assist` command to pass the text of your current buffer to GPT-4.
If you're editing a file with a `.zmd` extension, you can also invoke
the model with `cmd-enter.` (preview-only)
This makes the `Toggle{Left,Right,Bottom}Dock` actions deserializable
from empty JSON, so that they can be constructed for the command
palette. It also fixes a bug in GPUI's `available_actions` method, in
which we'd include key bindings for actions of the same type but
different values.
Note that, for now, the command palette will perform the *focusing*
version of the actions. I'm not totally sure this is the right behavior,
but it seems more useful to me.
Release Notes:
N/A