acp: Add support for slash commands (#37304)
Depends on https://github.com/zed-industries/agent-client-protocol/pull/45 Release Notes: - N/A --------- Co-authored-by: Antonio Scandurra <me@as-cii.com> Co-authored-by: Agus Zubiaga <agus@zed.dev>
This commit is contained in:
co-authored by
Antonio Scandurra
Agus Zubiaga
parent
f06be6f3ec
commit
374a8bc4cb
@@ -12952,6 +12952,21 @@ pub enum CompletionDocumentation {
|
||||
},
|
||||
}
|
||||
|
||||
impl CompletionDocumentation {
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub fn text(&self) -> SharedString {
|
||||
match self {
|
||||
CompletionDocumentation::Undocumented => "".into(),
|
||||
CompletionDocumentation::SingleLine(s) => s.clone(),
|
||||
CompletionDocumentation::MultiLinePlainText(s) => s.clone(),
|
||||
CompletionDocumentation::MultiLineMarkdown(s) => s.clone(),
|
||||
CompletionDocumentation::SingleLineAndMultiLinePlainText { single_line, .. } => {
|
||||
single_line.clone()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<lsp::Documentation> for CompletionDocumentation {
|
||||
fn from(docs: lsp::Documentation) -> Self {
|
||||
match docs {
|
||||
|
||||
Reference in New Issue
Block a user