pub struct ThreadMetadata {Show 27 fields
pub id: ThreadId,
pub rollout_path: PathBuf,
pub created_at: DateTime<Utc>,
pub updated_at: DateTime<Utc>,
pub recency_at: DateTime<Utc>,
pub source: String,
pub history_mode: ThreadHistoryMode,
pub thread_source: Option<ThreadSource>,
pub agent_nickname: Option<String>,
pub agent_role: Option<String>,
pub agent_path: Option<String>,
pub model_provider: String,
pub model: Option<String>,
pub reasoning_effort: Option<ReasoningEffort>,
pub cwd: PathBuf,
pub cli_version: String,
pub title: String,
pub name: Option<String>,
pub preview: Option<String>,
pub sandbox_policy: String,
pub approval_mode: String,
pub tokens_used: i64,
pub first_user_message: Option<String>,
pub archived_at: Option<DateTime<Utc>>,
pub git_sha: Option<String>,
pub git_branch: Option<String>,
pub git_origin_url: Option<String>,
}Expand description
Canonical persisted thread metadata.
Fields§
§id: ThreadIdThe thread identifier.
rollout_path: PathBufThe absolute rollout path on disk.
created_at: DateTime<Utc>The creation timestamp.
updated_at: DateTime<Utc>The last update timestamp.
recency_at: DateTime<Utc>The product recency timestamp.
source: StringThe session source (stringified enum).
history_mode: ThreadHistoryModePersisted thread history contract selected when this thread was created.
thread_source: Option<ThreadSource>Optional analytics source classification for this thread.
agent_nickname: Option<String>Optional random unique nickname assigned to an AgentControl-spawned sub-agent.
agent_role: Option<String>Optional role (agent_role) assigned to an AgentControl-spawned sub-agent.
agent_path: Option<String>Optional canonical agent path assigned to an AgentControl-spawned sub-agent.
model_provider: StringThe model provider identifier.
model: Option<String>The latest observed model for the thread.
reasoning_effort: Option<ReasoningEffort>The latest observed reasoning effort for the thread.
cwd: PathBufThe working directory for the thread.
cli_version: StringVersion of the CLI that created the thread.
title: StringA best-effort thread title.
name: Option<String>Explicit user-facing thread name, if one was set.
preview: Option<String>Best available user-facing preview for discovery and list display.
sandbox_policy: StringThe sandbox policy (stringified enum).
approval_mode: StringThe approval mode (stringified enum).
tokens_used: i64The last observed token usage.
first_user_message: Option<String>First user message observed for this thread, if any.
archived_at: Option<DateTime<Utc>>The archive timestamp, if the thread is archived.
git_sha: Option<String>The git commit SHA, if known.
git_branch: Option<String>The git branch name, if known.
git_origin_url: Option<String>The git origin URL, if known.
Implementations§
Source§impl ThreadMetadata
impl ThreadMetadata
Sourcepub fn prefer_existing_git_info(&mut self, existing: &Self)
pub fn prefer_existing_git_info(&mut self, existing: &Self)
Preserve SQLite-owned Git fields when rollout-derived metadata is reconciled.
Sourcepub fn prefer_existing_explicit_title(&mut self, existing: &Self)
pub fn prefer_existing_explicit_title(&mut self, existing: &Self)
Preserve an existing user-facing title when reconciling rollout-derived metadata.
Sourcepub fn diff_fields(&self, other: &Self) -> Vec<&'static str>
pub fn diff_fields(&self, other: &Self) -> Vec<&'static str>
Return the list of field names that differ between self and other.
Trait Implementations§
Source§impl Clone for ThreadMetadata
impl Clone for ThreadMetadata
Source§fn clone(&self) -> ThreadMetadata
fn clone(&self) -> ThreadMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ThreadMetadata
impl Debug for ThreadMetadata
impl Eq for ThreadMetadata
Source§impl PartialEq for ThreadMetadata
impl PartialEq for ThreadMetadata
impl StructuralPartialEq for ThreadMetadata
Auto Trait Implementations§
impl Freeze for ThreadMetadata
impl RefUnwindSafe for ThreadMetadata
impl Send for ThreadMetadata
impl Sync for ThreadMetadata
impl Unpin for ThreadMetadata
impl UnsafeUnpin for ThreadMetadata
impl UnwindSafe for ThreadMetadata
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
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