(file: PatchFile)
| 704 | } |
| 705 | |
| 706 | function patchLine(file: PatchFile): string { |
| 707 | const type = file.type |
| 708 | const rel = file.relativePath |
| 709 | const from = file.filePath |
| 710 | |
| 711 | if (type === "add") { |
| 712 | return `+ Created ${rel || toolPath(from)}` |
| 713 | } |
| 714 | |
| 715 | if (type === "delete") { |
| 716 | return `- Deleted ${rel || toolPath(from)}` |
| 717 | } |
| 718 | |
| 719 | if (type === "move") { |
| 720 | return `→ Moved ${toolPath(from)} → ${rel || toolPath(file.movePath)}` |
| 721 | } |
| 722 | |
| 723 | return `~ Patched ${rel || toolPath(from)}` |
| 724 | } |
| 725 | |
| 726 | function scrollPatchFinal(p: ToolProps<typeof ApplyPatchTool>): string { |
| 727 | if (p.frame.status === "error") { |
no test coverage detected