Changesets · Branches · Tags · Compare
| Changeset | ad172f4402b860409d42489b1ff8439dd6f32affdc01feab4592f839525a2abe |
|---|---|
| Author | Dallin Romney <dallinromney@gmail.com> · 2025-09-11 14:39 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-09-11 14:39 -07:00 |
| Parents | 631c10de5d5c, ca33fe3d7491 |
1 file changed
modified core/tools/implementations/viewDiff.ts +11 −0
| @@ -9,6 +9,17 @@ | ||
| 9 | 9 | // TODO includeUnstaged should be an option |
| 10 | 10 | |
| 11 | 11 | const combinedDiff = diffs.join("\n"); |
| 12 | + | |
| 13 | + if (!combinedDiff.trim()) { | |
| 14 | + return [ | |
| 15 | + { | |
| 16 | + name: "Diff", | |
| 17 | + description: "current Git diff", | |
| 18 | + content: "The current diff is empty", | |
| 19 | + }, | |
| 20 | + ]; | |
| 21 | + } | |
| 22 | + | |
| 12 | 23 | const diffLines = combinedDiff.split("\n"); |
| 13 | 24 | |
| 14 | 25 | let truncated = false; |