MCPcopy Index your code
hub / github.com/ChrisFeldmeier/OpenCodeRust / clean_diffs

Function clean_diffs

crates/opencode-session/src/summary.rs:481–493  ·  view source on GitHub ↗

Unquote git paths in diff results and return cleaned diffs. Matches TS `SessionSummary.diff` which unquotes git paths.

(diffs: Vec<SummaryFileDiff>)

Source from the content-addressed store, hash-verified

479///
480/// Matches TS `SessionSummary.diff` which unquotes git paths.
481pub fn clean_diffs(diffs: Vec<SummaryFileDiff>) -> Vec<SummaryFileDiff> {
482 diffs
483 .into_iter()
484 .map(|d| {
485 let file = unquote_git_path(&d.file);
486 SummaryFileDiff {
487 file,
488 additions: d.additions,
489 deletions: d.deletions,
490 }
491 })
492 .collect()
493}
494
495// ============================================================================
496// Title generation (simple fallback, LLM-based is in prompt.rs)

Callers 3

summarizeFunction · 0.85

Calls 1

unquote_git_pathFunction · 0.85

Tested by 1