pub struct ThreeWayAnalyzer;Expand description
Performs three-way attribution analysis
Given:
- Original content (before any AI edits)
- AI edit history (sequence of AI changes)
- Final content (what’s being committed)
Determines for each line in final content:
- Was it from the original file?
- Was it added by AI (and which edit/prompt)?
- Was it added by AI but modified by human?
- Was it added by human after AI edits?
Implementations§
Source§impl ThreeWayAnalyzer
impl ThreeWayAnalyzer
Sourcepub fn analyze(
history: &FileEditHistory,
final_content: &str,
) -> FileAttributionResult
pub fn analyze( history: &FileEditHistory, final_content: &str, ) -> FileAttributionResult
Analyze a file’s final content against its edit history
Sourcepub fn analyze_with_diff(
history: &FileEditHistory,
final_content: &str,
) -> FileAttributionResult
pub fn analyze_with_diff( history: &FileEditHistory, final_content: &str, ) -> FileAttributionResult
Analyze with position-aware diff for better accuracy
Sourcepub fn analyze_with_diff_with_threshold(
history: &FileEditHistory,
final_content: &str,
similarity_threshold: f64,
) -> FileAttributionResult
pub fn analyze_with_diff_with_threshold( history: &FileEditHistory, final_content: &str, similarity_threshold: f64, ) -> FileAttributionResult
Analyze with position-aware diff for better accuracy, using a custom similarity threshold
Auto Trait Implementations§
impl Freeze for ThreeWayAnalyzer
impl RefUnwindSafe for ThreeWayAnalyzer
impl Send for ThreeWayAnalyzer
impl Sync for ThreeWayAnalyzer
impl Unpin for ThreeWayAnalyzer
impl UnsafeUnpin for ThreeWayAnalyzer
impl UnwindSafe for ThreeWayAnalyzer
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