Skip to main content

ConversationResetMessage

Struct ConversationResetMessage 

Source
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:

  1. 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 next system init’s id.
  2. new_conversation_id is not the successor session id. In live measurement it matched nothing: not the post-reset session_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: String

A 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: String

The 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.

Trait Implementations§

Source§

impl Clone for ConversationResetMessage

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ConversationResetMessage

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for ConversationResetMessage

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for ConversationResetMessage

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.