Remove dead code
This commit is contained in:
parent
e9a9f6dace
commit
c03585359a
1 changed files with 1 additions and 28 deletions
|
@ -9,7 +9,7 @@ use buffer_diff::BufferDiff;
|
|||
use editor::{Bias, MultiBuffer, PathKey};
|
||||
use futures::{FutureExt, channel::oneshot, future::BoxFuture};
|
||||
use gpui::{AppContext, AsyncApp, Context, Entity, EventEmitter, SharedString, Task, WeakEntity};
|
||||
use itertools::{Itertools, PeekingNext};
|
||||
use itertools::Itertools;
|
||||
use language::{
|
||||
Anchor, Buffer, BufferSnapshot, Capability, LanguageRegistry, OffsetRangeExt as _, Point,
|
||||
text_diff,
|
||||
|
@ -355,33 +355,6 @@ impl ToolCallContent {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn from_acp_contents(
|
||||
content: Vec<acp::ToolCallContent>,
|
||||
language_registry: Arc<LanguageRegistry>,
|
||||
cx: &mut App,
|
||||
) -> Vec<Self> {
|
||||
content
|
||||
.into_iter()
|
||||
.peekable()
|
||||
.batching(|it| match it.next()? {
|
||||
acp::ToolCallContent::ContentBlock { content } => {
|
||||
let mut block = ContentBlock::new(content, &language_registry, cx);
|
||||
while let Some(acp::ToolCallContent::ContentBlock { content }) =
|
||||
it.peeking_next(|c| matches!(c, acp::ToolCallContent::ContentBlock { .. }))
|
||||
{
|
||||
block.append(content, &language_registry, cx);
|
||||
}
|
||||
Some(ToolCallContent::ContentBlock { content: block })
|
||||
}
|
||||
content @ acp::ToolCallContent::Diff { .. } => Some(ToolCallContent::from_acp(
|
||||
content,
|
||||
language_registry.clone(),
|
||||
cx,
|
||||
)),
|
||||
})
|
||||
.collect()
|
||||
}
|
||||
|
||||
pub fn to_markdown(&self, cx: &App) -> String {
|
||||
match self {
|
||||
Self::ContentBlock { content } => content.to_markdown(cx).to_string(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue