formatDiffEntry renders one changed file as STATUS path (+N/-M). It is the shared shape for both the grouping file list and the other-changed-files block, so every prompt that enumerates files presents them identically.
(d model.Diff)
| 1677 | // shared shape for both the grouping file list and the other-changed-files |
| 1678 | // block, so every prompt that enumerates files presents them identically. |
| 1679 | func formatDiffEntry(d model.Diff) string { |
| 1680 | status := "MODIFIED" |
| 1681 | switch { |
| 1682 | case d.IsNew: |
| 1683 | status = "ADDED" |
| 1684 | case d.IsDeleted: |
| 1685 | status = "DELETED" |
| 1686 | case d.IsRenamed: |
| 1687 | status = "RENAMED" |
| 1688 | } |
| 1689 | return fmt.Sprintf("%s %s (+%d/-%d)", status, effectivePath(d), d.Insertions, d.Deletions) |
| 1690 | } |
| 1691 | |
| 1692 | // buildChangeFilesExceptGroup returns a formatted list of changed files excluding all group members. |
| 1693 | func (a *Agent) buildChangeFilesExceptGroup(groupDiffs []model.Diff) string { |
no test coverage detected