Chat tools: argument validation, replace, file snapshots, server-fetched images, show_run, show_diff head/paths, schedule_followup

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-12-02 19:44:47 +00:00
parent c441400f36
commit d204ce3187
27 changed files with 1988 additions and 79 deletions
+3 -3
View File
@@ -20,15 +20,15 @@ type gitDiffEntry struct {
// work tree against it; two: those commits) plus, when includeUntracked, the
// untracked files Git does not ignore, and reads each file's patch within the
// show_diff bounds.
func collectGitDiff(git gitRunner, revisions []string, includeUntracked bool) (*protocol.StageFileChanges, error) {
func collectGitDiff(git gitRunner, revisions []string, includeUntracked bool, pathspecs []string) (*protocol.StageFileChanges, error) {
nameArgs := append([]string{"diff", "--name-status", "-z", "--no-renames"}, revisions...)
names, err := git.output(append(nameArgs, "--")...)
names, err := git.output(append(append(nameArgs, "--"), pathspecs...)...)
if err != nil {
return nil, err
}
entries := parseNameStatus(names)
if includeUntracked {
others, err := git.output("ls-files", "--others", "--exclude-standard", "-z")
others, err := git.output(append([]string{"ls-files", "--others", "--exclude-standard", "-z", "--"}, pathspecs...)...)
if err != nil {
return nil, err
}