Wire up @mentioned files in assistant2 (#23389)

`@mention`ed files in assistant2 now get replaced by the full path of
the file in what gets sent to the model, while rendering visually as
just the filename (in a crease, so they can only be selected/deleted as
a whole unit, not character by character).


https://github.com/user-attachments/assets/a5867a93-d656-4a17-aced-58424c6e8cf6

Release Notes:

- N/A

---------

Co-authored-by: João Marcos <joao@zed.dev>
Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
Richard Feldman 2025-01-20 21:33:18 -05:00 committed by GitHub
parent aacd80ee4a
commit 8f87b5637a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 147 additions and 9 deletions

View file

@ -39,6 +39,7 @@ impl ContextStrip {
pub fn new(
context_store: Model<ContextStore>,
workspace: WeakView<Workspace>,
editor: WeakView<Editor>,
thread_store: Option<WeakModel<ThreadStore>>,
context_picker_menu_handle: PopoverMenuHandle<ContextPicker>,
suggest_context_kind: SuggestContextKind,
@ -49,6 +50,7 @@ impl ContextStrip {
workspace.clone(),
thread_store.clone(),
context_store.downgrade(),
editor.clone(),
ConfirmBehavior::KeepOpen,
cx,
)