muse_code_sdk/msp/view/item_earlier_history.rs
1// @generated from the MSP stable schema and protocol sources; do not edit by hand.
2
3use serde::Deserialize;
4use serde::Serialize;
5
6/// `earlierHistory`: the boundary checkpoint's transcript tail, served in place
7/// of every item that opened in its pruned prefix. No log record carries it;
8/// the host derives it from the checkpoint.
9#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
10#[serde(rename_all = "camelCase")]
11#[non_exhaustive]
12pub struct EarlierHistory {
13 /// The tail entries whose source record is in the pruned prefix, in tail
14 /// order. May be empty.
15 pub messages: Vec<EarlierHistoryMessage>,
16}
17
18/// One transcript-tail message of an [`EarlierHistory`] item.
19#[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)]
20#[serde(rename_all = "camelCase")]
21#[non_exhaustive]
22pub struct EarlierHistoryMessage {
23 /// Open string enum: `"user"` or `"assistant"`, the only roles a host
24 /// serves; a client skips any other value.
25 pub role: String,
26 /// The stored tail text verbatim (at most 1,000 characters); clients
27 /// apply their own assistant display rules.
28 pub text: String,
29}