pub struct TraceContext {
pub revision: Option<String>,
pub session_id: Option<String>,
pub model_id: String,
pub provider: String,
pub turn_number: Option<u32>,
pub workspace_path: Option<PathBuf>,
}Expand description
Information needed to create a trace from file changes.
Fields§
§revision: Option<String>Git revision (commit SHA).
session_id: Option<String>Session ID for conversation URL.
model_id: StringModel ID in provider/model format.
provider: StringProvider name.
turn_number: Option<u32>Turn number.
workspace_path: Option<PathBuf>Workspace path for resolving relative paths.
Implementations§
Source§impl TraceContext
impl TraceContext
Sourcepub fn new(model_id: impl Into<String>, provider: impl Into<String>) -> Self
pub fn new(model_id: impl Into<String>, provider: impl Into<String>) -> Self
Create a new trace context.
Sourcepub fn with_revision(self, revision: impl Into<String>) -> Self
pub fn with_revision(self, revision: impl Into<String>) -> Self
Set the git revision.
Sourcepub fn with_session_id(self, session_id: impl Into<String>) -> Self
pub fn with_session_id(self, session_id: impl Into<String>) -> Self
Set the session ID.
Sourcepub fn with_turn_number(self, turn: u32) -> Self
pub fn with_turn_number(self, turn: u32) -> Self
Set the turn number.
Sourcepub fn with_workspace_path(self, path: impl Into<PathBuf>) -> Self
pub fn with_workspace_path(self, path: impl Into<PathBuf>) -> Self
Set the workspace path.
Sourcepub fn normalized_model_id(&self) -> String
pub fn normalized_model_id(&self) -> String
Get the normalized model ID.
Trait Implementations§
Source§impl Clone for TraceContext
impl Clone for TraceContext
Source§fn clone(&self) -> TraceContext
fn clone(&self) -> TraceContext
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for TraceContext
impl RefUnwindSafe for TraceContext
impl Send for TraceContext
impl Sync for TraceContext
impl Unpin for TraceContext
impl UnwindSafe for TraceContext
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