Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions core/tools/implementations/viewDiff.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,17 @@ export const viewDiffImpl: ToolImpl = async (args, extras) => {
// TODO includeUnstaged should be an option

const combinedDiff = diffs.join("\n");

if (!combinedDiff.trim()) {
return [
{
name: "Diff",
description: "current Git diff",
content: "The current diff is empty",
},
];
}

const diffLines = combinedDiff.split("\n");

let truncated = false;
Expand Down
Loading