Add streaming_diff
crate (#23264)
This PR extracts the streaming diff implementation to its own `streaming_diff` crate. It was duplicated between `assistant` and `assistant2`, but their implementations were exactly the same (and I don't see a reason why they would need to diverge). Release Notes: - N/A
This commit is contained in:
parent
4d22f7e529
commit
24495f09f9
12 changed files with 41 additions and 1113 deletions
|
@ -43,7 +43,6 @@ lsp.workspace = true
|
|||
markdown.workspace = true
|
||||
menu.workspace = true
|
||||
multi_buffer.workspace = true
|
||||
ordered-float.workspace = true
|
||||
parking_lot.workspace = true
|
||||
picker.workspace = true
|
||||
project.workspace = true
|
||||
|
@ -55,6 +54,7 @@ serde_json.workspace = true
|
|||
settings.workspace = true
|
||||
similar.workspace = true
|
||||
smol.workspace = true
|
||||
streaming_diff.workspace = true
|
||||
telemetry_events.workspace = true
|
||||
terminal.workspace = true
|
||||
terminal_view.workspace = true
|
||||
|
|
|
@ -9,7 +9,6 @@ mod context_strip;
|
|||
mod inline_assistant;
|
||||
mod inline_prompt_editor;
|
||||
mod message_editor;
|
||||
mod streaming_diff;
|
||||
mod terminal_codegen;
|
||||
mod terminal_inline_assistant;
|
||||
mod thread;
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
use crate::context::attach_context_to_message;
|
||||
use crate::context_store::ContextStore;
|
||||
use crate::inline_prompt_editor::CodegenStatus;
|
||||
use crate::streaming_diff::{CharOperation, LineDiff, LineOperation, StreamingDiff};
|
||||
use anyhow::{Context as _, Result};
|
||||
use client::telemetry::Telemetry;
|
||||
use collections::HashSet;
|
||||
|
@ -29,6 +28,7 @@ use std::{
|
|||
task::{self, Poll},
|
||||
time::Instant,
|
||||
};
|
||||
use streaming_diff::{CharOperation, LineDiff, LineOperation, StreamingDiff};
|
||||
use telemetry_events::{AssistantEvent, AssistantKind, AssistantPhase};
|
||||
|
||||
pub struct BufferCodegen {
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue