pub struct FileChange {
pub id: String,
pub change_type: FileChangeType,
pub file_path: String,
pub old_path: Option<String>,
pub timestamp: DateTime<Utc>,
pub lines_added: u64,
pub lines_removed: u64,
pub tool_call_id: Option<String>,
pub session_id: Option<String>,
pub description: Option<String>,
}Expand description
Represents a file change within a session.
Fields§
§id: String§change_type: FileChangeType§file_path: String§old_path: Option<String>For renames.
timestamp: DateTime<Utc>§lines_added: u64§lines_removed: u64§tool_call_id: Option<String>§session_id: Option<String>§description: Option<String>Human-readable description.
Implementations§
Source§impl FileChange
impl FileChange
Sourcepub fn new(change_type: FileChangeType, file_path: String) -> Self
pub fn new(change_type: FileChangeType, file_path: String) -> Self
Create a new FileChange with defaults.
Sourcepub fn get_file_icon(&self) -> &'static str
pub fn get_file_icon(&self) -> &'static str
Get file icon based on type.
Sourcepub fn get_status_color(&self) -> &'static str
pub fn get_status_color(&self) -> &'static str
Get status color for UI display.
Sourcepub fn get_change_summary(&self) -> String
pub fn get_change_summary(&self) -> String
Get human-readable change summary.
Trait Implementations§
Source§impl Clone for FileChange
impl Clone for FileChange
Source§fn clone(&self) -> FileChange
fn clone(&self) -> FileChange
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 moreSource§impl Debug for FileChange
impl Debug for FileChange
Source§impl<'de> Deserialize<'de> for FileChange
impl<'de> Deserialize<'de> for FileChange
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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for FileChange
impl RefUnwindSafe for FileChange
impl Send for FileChange
impl Sync for FileChange
impl Unpin for FileChange
impl UnsafeUnpin for FileChange
impl UnwindSafe for FileChange
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