pub struct ConversationView {
pub id: String,
pub started_at: Option<DateTime<Utc>>,
pub last_activity: Option<DateTime<Utc>>,
pub turns: Vec<Turn>,
pub total_usage: Option<TokenUsage>,
pub provider_id: Option<String>,
pub files_changed: Vec<String>,
pub session_ids: Vec<String>,
}Expand description
A complete conversation from any provider.
Fields§
§id: StringUnique session/conversation identifier.
started_at: Option<DateTime<Utc>>When the conversation started.
last_activity: Option<DateTime<Utc>>When the conversation was last active.
turns: Vec<Turn>Ordered turns.
total_usage: Option<TokenUsage>Aggregate token usage across all turns.
provider_id: Option<String>Provider identity (e.g. “claude-code”, “aider”, “codex-cli”).
files_changed: Vec<String>Files mutated during this conversation, deduplicated, in first-touch order. Populated by the provider from tool invocation inputs.
session_ids: Vec<String>All session IDs that were merged to produce this view, in chronological order (oldest segment first). Empty or single-element for non-chained conversations.
Implementations§
Source§impl ConversationView
impl ConversationView
Sourcepub fn title(&self, max_len: usize) -> Option<String>
pub fn title(&self, max_len: usize) -> Option<String>
Title derived from the first user turn, truncated to max_len characters.
Sourcepub fn turns_by_role(&self, role: &Role) -> Vec<&Turn>
pub fn turns_by_role(&self, role: &Role) -> Vec<&Turn>
All turns with the given role.
Sourcepub fn turns_since(&self, turn_id: &str) -> &[Turn]
pub fn turns_since(&self, turn_id: &str) -> &[Turn]
Turns added after the turn with the given ID.
If the ID is not found, returns all turns. If the ID is the last turn, returns an empty slice.
Trait Implementations§
Source§impl Clone for ConversationView
impl Clone for ConversationView
Source§fn clone(&self) -> ConversationView
fn clone(&self) -> ConversationView
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more