510
const edits = storedEdits?.get(d.toolCallId);
511
if (edits) {
513
>
const beforeUri = edit.kind === 'rename' && edit.originalPath
514
? URI.file(edit.originalPath).toString()
516
>
const afterUri = URI.file(edit.filePath).toString();
517
>
const hasBefore = edit.kind !== 'create';
518
>
const hasAfter = edit.kind !== 'delete';
519
>
content.push({
520
>
type: ToolResultContentType.FileEdit,
521
>
before: hasBefore ? {
522
>
uri: beforeUri,
523
>
content: { uri: buildSessionDbUri(sessionUriStr, edit.toolCallId, edit.filePath, 'before') },
524
>
} : undefined,
525
>
after: hasAfter ? {
526
>
uri: afterUri,
527
>
content: { uri: buildSessionDbUri(sessionUriStr, edit.toolCallId, edit.filePath, 'after') },
528
>
} : undefined,
529
>
diff: (edit.addedLines !== undefined || edit.removedLines !== undefined)
530
? { added: edit.addedLines, removed: edit.removedLines }
531
: undefined,
533
>
}
534
>
}
535
result.push({
536
session,