pub struct Entry {
pub id: u64,
pub role: EntryRole,
pub content: String,
pub reasoning: String,
pub done: bool,
pub error: Option<String>,
pub stats: Option<TurnStats>,
pub steps: Vec<Step>,
pub undoable: bool,
pub undone: bool,
pub attachments: Vec<MediaRef>,
}Expand description
One message in the conversation as shown to users.
Fields§
§id: u64§role: EntryRole§content: String§reasoning: String§done: boolFalse while the reply is still streaming.
error: Option<String>§stats: Option<TurnStats>§steps: Vec<Step>Tool calls made while producing this reply, in order. Part of the transcript so a client that connects late sees them and can answer pending approvals.
undoable: boolEvery file change of this reply can be reversed with ClientMsg::Undo.
undone: boolThe reply’s file changes were undone.
attachments: Vec<MediaRef>Files the user attached to this message.
Implementations§
Source§impl Entry
impl Entry
Sourcepub fn append(&mut self, content: &str, reasoning: &str)
pub fn append(&mut self, content: &str, reasoning: &str)
Apply a ServerMsg::EntryDelta.
Sourcepub fn upsert_step(&mut self, step: Step)
pub fn upsert_step(&mut self, step: Step)
Apply a ServerMsg::StepUpdated: replace the step with the same id, or append it.
Sourcepub fn pending_approvals(&self) -> impl Iterator<Item = &Step>
pub fn pending_approvals(&self) -> impl Iterator<Item = &Step>
Steps waiting for a user’s approval, subagents’ steps included.
Sourcepub fn apply_delegation(&mut self, step: u64, update: &DelegationUpdate)
pub fn apply_delegation(&mut self, step: u64, update: &DelegationUpdate)
Apply a ServerMsg::Delegation to step step’s subagent run.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Entry
impl<'de> Deserialize<'de> for Entry
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl StructuralPartialEq for Entry
Auto Trait Implementations§
impl Forget for Entry
impl Freeze for Entry
impl Move for Entry
impl RefUnwindSafe for Entry
impl Send for Entry
impl Sync for Entry
impl Unpin for Entry
impl UnsafeUnpin for Entry
impl UnwindSafe for Entry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more