assistant2: Add live context type and use in message editor (#22865)
Release Notes: - N/A --------- Co-authored-by: Marshall Bowers <elliott.codes@gmail.com> Co-authored-by: Marshall <marshall@zed.dev>
This commit is contained in:
parent
5d8ef94c86
commit
a0fca24e3f
15 changed files with 359 additions and 182 deletions
|
@ -282,11 +282,13 @@ impl ActiveThread {
|
|||
.child(div().p_2p5().text_ui(cx).child(markdown.clone()))
|
||||
.when_some(context, |parent, context| {
|
||||
if !context.is_empty() {
|
||||
parent.child(h_flex().flex_wrap().gap_1().px_1p5().pb_1p5().children(
|
||||
context.iter().map(|context| {
|
||||
ContextPill::new_added(context.clone(), false, None)
|
||||
}),
|
||||
))
|
||||
parent.child(
|
||||
h_flex().flex_wrap().gap_1().px_1p5().pb_1p5().children(
|
||||
context.into_iter().map(|context| {
|
||||
ContextPill::new_added(context, false, None)
|
||||
}),
|
||||
),
|
||||
)
|
||||
} else {
|
||||
parent
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue