pub struct FileMutation {
pub path: String,
pub tool_id: Option<String>,
pub operation: Option<String>,
pub raw_diff: Option<String>,
pub before: Option<String>,
pub after: Option<String>,
pub rename_to: Option<String>,
}Expand description
A file mutation resolved at view-construction time. Lives on the Turn
that produced it; derive_path projects each entry into a sibling
artifact change keyed by path with structural.type == "file.write".
tool_id links back to the specific ToolInvocation that caused the
mutation when the provider can identify it (codex via patch_apply_end
call_id, claude/gemini via tool-input attribution); None when the
mutation is attributable only to the turn as a whole (opencode’s
snapshot diffs between turns).
Fields§
§path: StringFile path (relative to view.base.working_dir if relative, or
file:///absolute).
tool_id: Option<String>ToolInvocation::id of the tool call that produced this mutation,
when the provider can attribute it.
operation: Option<String>Operation: "add", "update", "delete", or a provider-specific tag.
raw_diff: Option<String>Unified diff (the canonical perspective).
before: Option<String>File contents before this mutation (when known).
after: Option<String>File contents after this mutation (when known).
rename_to: Option<String>When this mutation is a rename, the new path. Projected to
structural.extra.rename_to.
Trait Implementations§
Source§impl Clone for FileMutation
impl Clone for FileMutation
Source§fn clone(&self) -> FileMutation
fn clone(&self) -> FileMutation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more