Watch
0
0
Fork
You've already forked hyperhive
0

swarm ui: show thinking is a toggle of its own, apart from the developer details

This commit is contained in:
iris 2026-11-16 20:35:03 +01:00 • committed by mara
commit 857b175a74

View file

@ -39,6 +39,17 @@ pub enum Level {
Error,
}
/// What a row is about, for the few kinds a client treats on their own. Most
/// rows have none; their `level` and `icon` say what they need to.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum Kind {
/// What claude is thinking: its thinking text and the live count of
/// thinking tokens. A client can show or hide these apart from the other
/// `debug` rows.
Thinking,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Serialize)]
#[serde(rename_all = "snake_case")]
pub enum BodyFormat {
@ -68,6 +79,8 @@ pub struct TermMsg {
pub body_format: Option<BodyFormat>,
#[serde(skip_serializing_if = "Option::is_none")]
pub coalesce_key: Option<String>,
#[serde(skip_serializing_if = "Option::is_none")]
pub kind: Option<Kind>,
}
impl TermMsg {
@ -80,6 +93,7 @@ impl TermMsg {
body: None,
body_format: None,
coalesce_key: None,
kind: None,
}
}
@ -102,6 +116,12 @@ impl TermMsg {
self
}
#[must_use]
pub fn kind(mut self, kind: Kind) -> Self {
self.kind = Some(kind);
self
}
/// Stamp the row with the time of the event it came from.
#[must_use]
pub fn at(mut self, ts: impl Into<String>) -> Self {