pub struct Chat {
pub schema: u32,
pub id: String,
pub repo: PathBuf,
pub from: Option<String>,
pub agent: String,
pub status: ChatStatus,
pub turns: Vec<Turn>,
pub draft: Option<String>,
pub task: Option<String>,
pub created_at: Timestamp,
pub updated_at: Timestamp,
/* private fields */
}Expand description
One planning conversation.
Fields§
§schema: u32On-disk format version.
id: StringConversation id, e.g. 20260903-014455-ab12.
repo: PathBufRepository the task will be filed against.
from: Option<String>The chat this one was derived from, when it began as a fork into a
different repository. See derived_background. #[serde(default)]
so a conversation recorded before this field existed still reads.
agent: StringRoster agent id doing the interviewing.
status: ChatStatusCurrent state.
turns: Vec<Turn>Everything said, oldest first.
draft: Option<String>The task file, once the agent has written one.
task: Option<String>Queue task id, once filed.
created_at: TimestampWhen the conversation was opened.
updated_at: TimestampLast change to this file.
Implementations§
Source§impl Chat
impl Chat
Sourcepub fn short(&self) -> &str
pub fn short(&self) -> &str
Short form used in lists and notifications, matching a run’s short id.
Sourcepub fn agent_turns(&self) -> usize
pub fn agent_turns(&self) -> usize
How many turns the interviewing agent has actually taken.
Read off the seat rather than counted from Chat::turns, because a
failed turn appends a MAGI_NOTE message that no agent wrote. The
number names artifacts, so it has to match what was invoked.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Chat
impl<'de> Deserialize<'de> for Chat
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>,
Auto Trait Implementations§
impl Freeze for Chat
impl RefUnwindSafe for Chat
impl Send for Chat
impl Sync for Chat
impl Unpin for Chat
impl UnsafeUnpin for Chat
impl UnwindSafe for Chat
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more