We'll now show an error message if the user tries to add a directory
that contains no text files or when they try to add a single non-text
file.
Release Notes:
- N/A
---------
Co-authored-by: Danilo <danilo@zed.dev>
Ensuring all of the assistant 2 actions have keybindings.
Release Notes:
- N/A
---------
Co-authored-by: Agus Zubiaga <hi@aguz.me>
Co-authored-by: Marshall Bowers <elliott.codes@gmail.com>
This PR adds some intermediate bindings to the checks for if a
file/directory is already included to make the conditional a bit
clearer.
It wasn't immediately obvious what the boolean values corresponded to
when looking at it.
Release Notes:
- N/A
This PR makes it so the context is persistent in the thread, rather than
having to reattach it for each message.
This PR intentionally does not make an attempt to refresh the attached
context if it changes. That will come in a follow-up.
Release Notes:
- N/A
The most relevant change in this PR is ensuring that the path tooltip
doesn't overlap with the "Remove Context" tooltip. Now, the former
tooltip only shows if you hover over the context pill's label. This
avoids a little flicker that was happening as the path tooltip would
show first and then quickly followed by the icon button's one.
Release Notes:
- N/A
This PR is a small refactoring in advance of some other changes.
Previously we were storing the whole `Context` associated with each
message. However, it's likely that multiple messages may end up using
the same context.
We now store the deduped context in a separate collection and refer to
it from each message by its `ContextId`.
Release Notes:
- N/A
Context pills for files will now only display the basename of the file.
If two files have the same base name, we will also show their parent
directories, mimicking the behavior of editor tabs.
https://github.com/user-attachments/assets/ee88ee3b-80ff-4115-9ff9-8fe4845a67d8
Note: The double `/` in the file picker is a known separate issue.
Release Notes:
- N/A
---------
Co-authored-by: Danilo <danilo@zed.dev>
Co-authored-by: Danilo Leal <daniloleal09@gmail.com>
This PR adds some missing calls to clear the sub-collections in the
`ThreadStore` when we call `ThreadStore::drain` or `ThreadStore::clear`.
Release Notes:
- N/A
- [x] Rewrite worktree git handling
- [x] Fix tests
- [x] Fix `test_propagate_statuses_for_repos_under_project`
- [x] Replace `WorkDirectoryEntry` with `WorkDirectory` in
`RepositoryEntry`
- [x] Add a worktree event for capturing git status changes
- [x] Confirm that the local repositories are correctly updating the new
WorkDirectory field
- [x] Implement the git statuses query as a join when pulling entries
out of worktree
- [x] Use this new join to implement the project panel and outline
panel.
- [x] Synchronize git statuses over the wire for collab and remote dev
(use the existing `worktree_repository_statuses` table, adjust as
needed)
- [x] Only send changed statuses to collab
Release Notes:
- N/A
---------
Co-authored-by: Cole Miller <cole@zed.dev>
Co-authored-by: Mikayla <mikayla@zed.com>
Co-authored-by: Nathan <nathan@zed.dev>
This PR adds another example thread to showcase a response with long
lines of code.
This example will be helpful when working to make the code blocks scroll
horizontally instead of wrapping.
Release Notes:
- N/A
This means that `workspace::ToggleRightDock` will open the assistant if
no right-dock panel has been manually activated, instead of the chat as
before. Also cleans up the `active_panel_index` logic a bit.
cc @nathansobo
Release Notes:
- Make `workspace::ToggleRightDock` open the assistant panel if no
right-dock panel has yet been activated
Up until now, in the assistant 2, if you scrolled up either while a
message was being generated or after it's been generated, then submitted
a new message, you'd keep your scroll position. Now, with this PR, if
your scroll position is somewhere else that's not the bottom, as you
submit a new message, you'll be back at the bottom.
https://github.com/user-attachments/assets/8b111c10-27ff-4d7b-9b10-4c31093c6457
Release Notes:
- N/A
Co-authored-by: Agus Zubiaga <hi@aguz.me>
This PR makes it so we always show the "Add Context {keybinding}" text
when there's no context pills attached. Also, while we haven't fully
implemented the mention system (triggered by typing `@`), we removed the
instruction on the message editor placeholder. Once that's fully in
place, we should return with it!
<img width="800" alt="Screenshot 2024-12-27 at 1 35 56 PM"
src="https://github.com/user-attachments/assets/201cf784-e7ac-420a-adf2-51b6e075c2b6"
/>
Release Notes:
- N/A
---------
Co-authored-by: Agus Zubiaga <hi@aguz.me>
This PR adds an icon field to the `ContextKind` enum, which means that
icons will now display on context pills, both on the message editor and
on the active thread.
<img width="800" alt="Screenshot 2024-12-24 at 12 23 17 AM"
src="https://github.com/user-attachments/assets/f00e540b-30fe-49ac-b3df-7c7a5dc86d65"
/>
Release Notes:
- N/A
Builds on https://github.com/zed-industries/zed/pull/22160 and extracts
the rest of `PromptEditor` so it can be shared across terminal and
inline assistants. This will help avoid the UI drifting as we have
already observed.
Note: This is mostly a mechanical refactor. I imagine some things could
be factored in a better way by someone with more context, but I think
this is a good start.
Release Notes:
- N/A
---------
Co-authored-by: Richard Feldman <oss@rtfeldman.com>
This PR adds an initial version of using `@` in the message editor to
add context to the thread.
We don't yet insert any sort of reference to it in the message body
itself.
Release Notes:
- N/A
Also makes the inline assistant and inline terminal assistant share a
bunch more code.
Release Notes:
- N/A
---------
Co-authored-by: Agus <agus@zed.dev>
Co-authored-by: Agus Zubiaga <hi@aguz.me>
This PR fixes some focus issues with opening the thread history, which
required that the Assistant2 panel be focused in order for the history
to open.
Release Notes:
- N/A
This PR fixes an issue with the Assistant2 file context picker where
files weren't being attached properly.
We needed to retrieve the files from the worktree without the worktree
root name in the file path.
Release Notes:
- N/A
---------
Co-authored-by: Max <max@zed.dev>