Elffuss BraidHub

kikocis/continue public

feat: empty diff tool result message
Changesetbb08e0e95ef3064edb59a1a39dd3a398db289700c911ad3518465269365e9c9d
AuthorDallin Romney <dallinromney@gmail.com> · 2025-09-10 19:26 -07:00
CommitterDallin Romney <dallinromney@gmail.com> · 2025-09-10 19:26 -07:00
Parents91ef819325d3

Browse the files at this changeset

1 file changed

modified core/tools/implementations/viewDiff.ts +11 −0
@@ -9,6 +9,17 @@
99 // TODO includeUnstaged should be an option
1010
1111 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+
1223 const diffLines = combinedDiff.split("\n");
1324
1425 let truncated = false;