Don't show deleted hunks when agent overwrites file (#29918)
Release Notes: - Improved display of diffs when the agent rewrites a file from scratch.
This commit is contained in:
parent
4a7b3aa4b8
commit
5674b5cd4d
8 changed files with 43 additions and 40 deletions
|
@ -1816,7 +1816,7 @@ mod tests {
|
|||
.await
|
||||
.unwrap();
|
||||
cx.update(|_, cx| {
|
||||
action_log.update(cx, |log, cx| log.track_buffer(buffer.clone(), cx));
|
||||
action_log.update(cx, |log, cx| log.buffer_read(buffer.clone(), cx));
|
||||
buffer.update(cx, |buffer, cx| {
|
||||
buffer
|
||||
.edit(
|
||||
|
@ -2031,7 +2031,7 @@ mod tests {
|
|||
|
||||
// Make changes
|
||||
cx.update(|_, cx| {
|
||||
action_log.update(cx, |log, cx| log.track_buffer(buffer1.clone(), cx));
|
||||
action_log.update(cx, |log, cx| log.buffer_read(buffer1.clone(), cx));
|
||||
buffer1.update(cx, |buffer, cx| {
|
||||
buffer
|
||||
.edit(
|
||||
|
@ -2048,7 +2048,7 @@ mod tests {
|
|||
});
|
||||
action_log.update(cx, |log, cx| log.buffer_edited(buffer1.clone(), cx));
|
||||
|
||||
action_log.update(cx, |log, cx| log.track_buffer(buffer2.clone(), cx));
|
||||
action_log.update(cx, |log, cx| log.buffer_read(buffer2.clone(), cx));
|
||||
buffer2.update(cx, |buffer, cx| {
|
||||
buffer
|
||||
.edit(
|
||||
|
|
|
@ -898,7 +898,7 @@ impl Thread {
|
|||
if !loaded_context.referenced_buffers.is_empty() {
|
||||
self.action_log.update(cx, |log, cx| {
|
||||
for buffer in loaded_context.referenced_buffers {
|
||||
log.track_buffer(buffer, cx);
|
||||
log.buffer_read(buffer, cx);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue