hive-agent: add speech-bubble icon to assistant text output rows
This commit is contained in:
parent
a1b2541d62
commit
516716fa93
1 changed files with 7 additions and 2 deletions
|
|
@ -230,10 +230,13 @@ fn classify_assistant_content(content: &[Value], ctx: &mut ClassifyCtx) -> Vec<T
|
|||
let text = c.get("text").and_then(Value::as_str).unwrap_or("");
|
||||
if !text.trim().is_empty() {
|
||||
// No separate summary line — the markdown body is the
|
||||
// whole row, matching the old `.text` row shape.
|
||||
// whole row, matching the old `.text` row shape. Speech
|
||||
// balloon distinguishes claude's spoken output from the
|
||||
// thought balloon on a "thinking" row just below.
|
||||
rows.push(
|
||||
TermMsg::new(Level::Info, String::new())
|
||||
.body(text.to_owned(), Some(BodyFormat::Markdown)),
|
||||
.body(text.to_owned(), Some(BodyFormat::Markdown))
|
||||
.icon("💬"),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -1388,6 +1391,7 @@ mod tests {
|
|||
assert_eq!(m.summary, "");
|
||||
assert_eq!(m.body.as_deref(), Some("# hi"));
|
||||
assert_eq!(m.body_format, Some(BodyFormat::Markdown));
|
||||
assert_eq!(m.icon.as_deref(), Some("💬"));
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
@ -1420,6 +1424,7 @@ mod tests {
|
|||
&mut ctx,
|
||||
);
|
||||
assert_eq!(rows.len(), 3, "the unknown content block is skipped");
|
||||
assert_eq!(rows[0].icon.as_deref(), Some("💬"));
|
||||
assert_eq!(rows[1].icon.as_deref(), Some("💭"));
|
||||
// The tool_use was recorded for later correlation as a side effect.
|
||||
assert_eq!(ctx.tool_name("t1"), Some("Bash"));
|
||||
|
|
|
|||
Loading…
Reference in a new issue