Add update_file functionality to support editing files #1

Open
opened 2025-01-29 16:20:11 +00:00 by stwhite · 0 comments
Owner

Hi, I've created a branch add-update-file with a patch file that adds support for updating existing files. The changes include:

  1. A new UpdateFileArgs interface
  2. A new update_file tool registration with schema
  3. A new case handler to implement the update functionality

To apply these changes:

  1. Pull the add-update-file branch
  2. Apply the patch file:
    git apply add-update-file.patch
    
  3. The changes can then be merged back to main

The implementation supports:

  • Updating existing files via PUT requests
  • SHA validation to prevent conflicts
  • Optional branch specification
  • Response includes both the commit info and updated file content

Let me know if you need any adjustments to the implementation!

Hi, I've created a branch `add-update-file` with a patch file that adds support for updating existing files. The changes include: 1. A new `UpdateFileArgs` interface 2. A new `update_file` tool registration with schema 3. A new case handler to implement the update functionality To apply these changes: 1. Pull the `add-update-file` branch 2. Apply the patch file: ```bash git apply add-update-file.patch ``` 3. The changes can then be merged back to main The implementation supports: - Updating existing files via PUT requests - SHA validation to prevent conflicts - Optional branch specification - Response includes both the commit info and updated file content Let me know if you need any adjustments to the implementation!
Sign in to join this conversation.
No Label
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: stwhite/gitea-mcp#1
No description provided.