Elffuss BraidHub

kikocis/continue public

98ee76272f4b · 450 BRawPermalink
1import { ToolImpl } from ".";
2import { getDiffsFromCache } from "../../autocomplete/snippets/gitDiffCache";
3
4export const viewDiffImpl: ToolImpl = async (args, extras) => {
5 const diffs = await getDiffsFromCache(extras.ide); // const diffs = await extras.ide.getDiff(true);
6 // TODO includeUnstaged should be an option
7
8 return [
9 {
10 name: "Diff",
11 description: "The current git diff",
12 content: diffs.join("\n"),
13 },
14 ];
15};