Merge pull request #7698 from continuedev/dallin/no-diff-output
feat: empty diff tool result message
This commit is contained in:
commit
e9d4ddcd2c
1 changed files with 11 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue