Watch
0
0
Fork
You've already forked hyperhive
0

move the send and turn row markers into hive-types

This commit is contained in:
atlas 2026-10-18 19:06:36 +02:00
commit 6084fb6329
9 changed files with 119 additions and 43 deletions

View file

@ -15,7 +15,8 @@
//! `mcp__hyperhive__send`'s row say, which tools get an expandable body)
//! didn't change; only the shape it gets packed into did.
use crate::term_msg::{BodyFormat, ClassifyCtx, Level, SEND_ICON, SEND_SUMMARY_PREFIX, TermMsg};
use crate::term_msg::{BodyFormat, ClassifyCtx, Level, TermMsg};
use hive_types::term_msg::{SEND_ICON, SEND_SUMMARY_PREFIX};
use serde_json::{Value, json};
/// Classify one raw claude stream-json line into zero or more terminal rows.
@ -1346,13 +1347,16 @@ mod tests {
}));
assert_eq!(row.icon.as_deref(), Some(SEND_ICON));
assert_eq!(row.summary.contains(" · 3L"), lines, "{}", row.summary);
assert_eq!(crate::term_msg::send_recipient(&row.summary), Some("iris"));
assert_eq!(
hive_types::term_msg::send_recipient(&row.summary),
Some("iris")
);
}
assert_eq!(crate::term_msg::send_recipient("send* →"), None);
assert_eq!(crate::term_msg::send_recipient("Read(x)"), None);
assert_eq!(hive_types::term_msg::send_recipient("send* →"), None);
assert_eq!(hive_types::term_msg::send_recipient("Read(x)"), None);
// A suffix lookalike in the name is not stripped.
assert_eq!(
crate::term_msg::send_recipient("send* → a · xL"),
hive_types::term_msg::send_recipient("send* → a · xL"),
Some("a · xL")
);
}