pub struct ConversationResetMessage {
pub new_conversation_id: String,
pub uuid: String,
pub session_id: String,
pub trigger: Option<ConversationResetTrigger>,
pub user_message_uuid: Option<String>,
pub timestamp: Option<String>,
}Expand description
Emitted when the conversation is reset mid-stream (e.g. /clear sent as
user input). Identity semantics, measured live against CLI 2.1.232 —
two traps here:
- The session id rotates. After this frame the same process re-inits
and every subsequent frame carries a NEW
session_id; both the old and new ids get real transcript files on disk. A consumer keying a live stream’s transcript by its first-seen session id will mis-attribute everything after a reset — treat this frame as a session-identity boundary and adopt the nextsysteminit’s id. new_conversation_idis not the successor session id. In live measurement it matched nothing: not the post-resetsession_id, no transcript file, never referenced by any later frame. Do not key on it.
Pinned by conversation_reset_rotates_the_session_id in the live
integration tests.
Fields§
§new_conversation_id: StringA fresh id announced for the new conversation. Not observed to
match the post-reset session_id or anything else on the wire or
disk — see the type-level docs before using.
uuid: String§session_id: StringThe OLD session id — the identity being retired by this reset.
trigger: Option<ConversationResetTrigger>What discarded the conversation. Informational: reset on every
conversation_reset frame whatever this says, and treat an absent
(CLI before 2.1.281) or unrecognized value as an unspecified reset.
user_message_uuid: Option<String>Only with trigger clear: the uuid of the user message whose
/clear was executed (the client’s own uuid for that message when it
came from a Remote Control or stream-json client, otherwise the uuid
the CLI assigned to the typed command). Lets a consumer match this
frame to a /clear message it has already seen, wiping once whichever
arrives first. Absent for the other triggers, when that uuid is not a
canonical UUID, and from CLIs before 2.1.281.
timestamp: Option<String>When the reset happened, as an ISO 8601 string in UTC from the clock of the process that performed it. Meant for display, not for ordering frames. Absent from CLIs before 2.1.281; fall back to the time the frame was received.