Skip to content

Add patch application tools and improve git_add parsing #6

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

tomholford
Copy link
Contributor

Adds two missing git operations and fixes LLM interaction issues with file staging.

git_apply_patch_string / git_apply_patch_file

  • Apply patches from string content or file paths
  • Implements missing git apply functionality in MCP interface
  • Added to both shell and gogit backends

Enhanced git_add parsing

  • Supports comma-separated: "file1.js,file2.js"
  • Supports space-delimited: "file1.js file2.js"
  • Supports single file: "file1.js"
  • Fixes LLM inconsistency when staging multiple files

Implements two new tools for applying git patches:
- git_apply_patch_string: Applies a patch from a string to a repository
- git_apply_patch_file: Applies a patch from a file to a repository

The string-based implementation creates a temporary file and delegates to the file-based implementation to maintain DRY principles. Updated README.md to document the new tools.
Support parsing files as a single filename, comma-separated or space-delimited list to accommodate inconsistent LLM interactions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant