Trim index output (#11445)

Trims down the project index output view in assistant2 to just list the
filenames and hideaway the query.

<img width="374" alt="image"
src="https://github.com/zed-industries/zed/assets/836375/8603e3cf-9fdc-4661-bc45-1d87621a006f">

Introduces a way for tools to render running.

Release Notes:

- N/A

---------

Co-authored-by: Max <max@zed.dev>
This commit is contained in:
Kyle Kelley 2024-05-06 10:37:31 -07:00 committed by GitHub
parent f658af5903
commit 32b59bfa0e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 106 additions and 75 deletions

View file

@ -724,21 +724,7 @@ impl AssistantChat {
let tools = tool_calls
.iter()
.map(|tool_call| {
let result = &tool_call.result;
let name = tool_call.name.clone();
match result {
Some(result) => div()
.p_2()
.child(result.into_any_element(&name))
.into_any_element(),
None => div()
.p_2()
.child(Label::new(name).color(Color::Modified))
.child("Running...")
.into_any_element(),
}
})
.map(|tool_call| self.tool_registry.render_tool_call(tool_call, cx))
.collect::<Vec<AnyElement>>();
let tools_body = if tools.is_empty() {