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
|
@ -1,7 +1,6 @@
|
|||
use crate::{
|
||||
humanize_token_count, AssistantPanel, AssistantPanelEvent, CharOperation,
|
||||
CycleNextInlineAssist, CyclePreviousInlineAssist, LineDiff, LineOperation, RequestType,
|
||||
StreamingDiff,
|
||||
humanize_token_count, AssistantPanel, AssistantPanelEvent, CycleNextInlineAssist,
|
||||
CyclePreviousInlineAssist, RequestType,
|
||||
};
|
||||
use anyhow::{anyhow, Context as _, Result};
|
||||
use assistant_settings::AssistantSettings;
|
||||
|
@ -56,6 +55,7 @@ use std::{
|
|||
task::{self, Poll},
|
||||
time::{Duration, Instant},
|
||||
};
|
||||
use streaming_diff::{CharOperation, LineDiff, LineOperation, StreamingDiff};
|
||||
use telemetry_events::{AssistantEvent, AssistantKind, AssistantPhase};
|
||||
use terminal_view::terminal_panel::TerminalPanel;
|
||||
use text::{OffsetRangeExt, ToPoint as _};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue