acp: Hide loading diff animation for external agents and update in place (#36699)
The loading diff animation can be jarring for external agents because they stream the diff at the same time the tool call is pushed, so it's only displayed while we're asynchronously calculating the diff. We'll now only show it for the native agent. Also, we'll now only update the diff when it changes, which avoids unnecessarily hiding it for a few frames. Release Notes: - N/A Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
This commit is contained in:
parent
d0583ede48
commit
725ed5dd01
3 changed files with 85 additions and 21 deletions
|
@ -1625,7 +1625,9 @@ impl AcpThreadView {
|
|||
.into_any()
|
||||
}
|
||||
ToolCallStatus::Pending | ToolCallStatus::InProgress
|
||||
if is_edit && tool_call.content.is_empty() =>
|
||||
if is_edit
|
||||
&& tool_call.content.is_empty()
|
||||
&& self.as_native_connection(cx).is_some() =>
|
||||
{
|
||||
self.render_diff_loading(cx).into_any()
|
||||
}
|
||||
|
@ -1981,7 +1983,7 @@ impl AcpThreadView {
|
|||
&& diff.read(cx).has_revealed_range(cx)
|
||||
{
|
||||
editor.into_any_element()
|
||||
} else if tool_progress {
|
||||
} else if tool_progress && self.as_native_connection(cx).is_some() {
|
||||
self.render_diff_loading(cx)
|
||||
} else {
|
||||
Empty.into_any()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue