You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sdk.ide.Diff() returns nothing even when git diff --cached does #1285
area:slash-commandsRelates to the slash commands featureide:vscodeRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behavioros:macHappening specifically on Macstale
changed the title [-]sdk.ide.Diff() returns nothing even when `git diff --cached` does[/-][+]`sdk.ide.Diff()` returns nothing even when `git diff --cached` does[/+]on May 15, 2024
So it seems like this cache parameter actually is a "staged or not staged" parameter after having tested it a bunch. I'm weary of this, probably there's some reason something staged would be cached, but haven't found the behavior to be otherwise yet. So this commit is my solution for now, but I'm going to keep my eye on it. The thing to look for at this point would be duplication
I noticed this problem myself, just trying to use @Git Diff summarize this commit for me in the chat panel. I assume it's the same problem, because all of the files in the commit were new, and staged to be committed. Because they're all new (untracked) files, even running git diff from the terminal shows no diff. If I stage them (adding them to the index), then git diff also shows no changes, because they're already staged. I think what would be nice is for @Git Diff to use git diff --cached to just look at the staged changes (that way I can control exactly what I want it to summarize for me).
If I should open a separate ticket for this, let me know. It looks like your proposed solution is to include staged and unstaged changes in the context, which would also be fine I suppose. It still doesn't include untracked files, and doesn't allow as much control (in terms of what changes are being included), but it would work well for 90% of cases.
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
This appears to work in v1.0.1! 🎉 If you stage some changes, they show up in @Git Diff. If you have changes staged AND unstaged changes, you will get two change sets, which could be confusing to continue.dev, but... it's also confusing to a human, so nothing unique there. There might be a way to improve on that (like split @Git diff into @Git Staged and @Git Unstaged) but that could be controversial so I think the original scope of this ticket can be considered resolved!
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!
area:slash-commandsRelates to the slash commands featureide:vscodeRelates specifically to VS Code extensionkind:bugIndicates an unexpected problem or unintended behavioros:macHappening specifically on Macstale
Activity
cristoslc commentedon May 15, 2024
Discord ref: https://discord.com/channels/1108621136150929458/1108621136830398496/1240360160766066779
[-]sdk.ide.Diff() returns nothing even when `git diff --cached` does[/-][+]`sdk.ide.Diff()` returns nothing even when `git diff --cached` does[/+]sestinj commentedon May 15, 2024
Relevant line of code is here:
https://github.com/continuedev/continue/blob/preview/extensions/vscode/src/util/ideUtils.ts#L593-L594
It looks like the one arg to this function is whether or not to use caching
sestinj commentedon May 15, 2024
So it seems like this cache parameter actually is a "staged or not staged" parameter after having tested it a bunch. I'm weary of this, probably there's some reason something staged would be cached, but haven't found the behavior to be otherwise yet. So this commit is my solution for now, but I'm going to keep my eye on it. The thing to look for at this point would be duplication
b5052a3
mltsy commentedon Jun 3, 2024
I noticed this problem myself, just trying to use
@Git Diff summarize this commit for mein the chat panel. I assume it's the same problem, because all of the files in the commit were new, and staged to be committed. Because they're all new (untracked) files, even runninggit difffrom the terminal shows no diff. If I stage them (adding them to the index), thengit diffalso shows no changes, because they're already staged. I think what would be nice is for@Git Diffto usegit diff --cachedto just look at the staged changes (that way I can control exactly what I want it to summarize for me).If I should open a separate ticket for this, let me know. It looks like your proposed solution is to include staged and unstaged changes in the context, which would also be fine I suppose. It still doesn't include untracked files, and doesn't allow as much control (in terms of what changes are being included), but it would work well for 90% of cases.
github-actions commentedon Mar 3, 2025
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
mltsy commentedon Mar 3, 2025
This appears to work in v1.0.1! 🎉 If you stage some changes, they show up in
@Git Diff. If you have changes staged AND unstaged changes, you will get two change sets, which could be confusing to continue.dev, but... it's also confusing to a human, so nothing unique there. There might be a way to improve on that (like split@Git diffinto@Git Stagedand@Git Unstaged) but that could be controversial so I think the original scope of this ticket can be considered resolved!github-actions commentedon Aug 6, 2025
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
github-actions commentedon Aug 17, 2025
This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!