Wire up @mention
ed 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:
parent
aacd80ee4a
commit
8f87b5637a
6 changed files with 147 additions and 9 deletions
|
@ -8,7 +8,7 @@ pub use crate::slash_command_working_set::*;
|
|||
use anyhow::Result;
|
||||
use futures::stream::{self, BoxStream};
|
||||
use futures::StreamExt;
|
||||
use gpui::{AnyElement, AppContext, ElementId, SharedString, Task, WeakView, WindowContext};
|
||||
use gpui::{AppContext, SharedString, Task, WeakView, WindowContext};
|
||||
use language::{BufferSnapshot, CodeLabel, LspAdapterDelegate, OffsetRangeExt};
|
||||
pub use language_model::Role;
|
||||
use serde::{Deserialize, Serialize};
|
||||
|
@ -103,12 +103,6 @@ pub trait SlashCommand: 'static + Send + Sync {
|
|||
) -> Task<SlashCommandResult>;
|
||||
}
|
||||
|
||||
pub type RenderFoldPlaceholder = Arc<
|
||||
dyn Send
|
||||
+ Sync
|
||||
+ Fn(ElementId, Arc<dyn Fn(&mut WindowContext)>, &mut WindowContext) -> AnyElement,
|
||||
>;
|
||||
|
||||
#[derive(Debug, PartialEq)]
|
||||
pub enum SlashCommandContent {
|
||||
Text {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue