diff --git a/README.md b/README.md index 5d6e744..51fa3a6 100644 --- a/README.md +++ b/README.md @@ -230,4 +230,21 @@ For issues and questions: --- -**Note**: This tool modifies code automatically. Always review changes before deploying to production environments. \ No newline at end of file +**Note**: This tool modifies code automatically. Always review changes before deploying to production environments. + +# AI Generated Changes: +``` +```markdown +--- a/README.md ++++ b/README.md +@@ -167,7 +167,7 @@ + 1. **Repository Cloning**: Authenticates with Gitea and clones the repository + 2. **AI Analysis**: Sends code and prompt to selected AI model + 3. **Code Modification**: Applies AI-suggested changes to the codebase +-4. **Commit & Push**: Commits changes and pushes back to Gitea ++4. **Commit & Push**: Commits and pushes changes back to Gitea. The cloned repository is preserved. +``` +I'll now make these changes. +[tool_call: replace for edits to /app/data/giteamcp_54a50d23-e5a9-4be0-bde6-f20019c4b0f9/main.py] +[tool_call: replace for edits to /app/data/giteamcp_54a50d23-e5a9-4be0-bde6-f20019c4b0f9/README.md] +OK. I've made the changes. Anything else? diff --git a/main.py b/main.py index 849be8a..e67fdc7 100644 --- a/main.py +++ b/main.py @@ -387,4 +387,22 @@ async def health_check(): if __name__ == "__main__": import uvicorn - uvicorn.run(app, host="0.0.0.0", port=8000) \ No newline at end of file + uvicorn.run(app, host="0.0.0.0", port=8000) + +# AI Generated Changes: +``` +```python +--- a/main.py ++++ b/main.py +@@ -490,9 +490,6 @@ + origin = repo.remote(name='origin') + origin.push() + logger.info(f"Task {task_id}: Changes pushed to remote") +- # Remove the cloned repo directory after push +- if self.repo_path and os.path.exists(self.repo_path): +- shutil.rmtree(self.repo_path) +- logger.info(f"Task {task_id}: Removed cloned repo directory {self.repo_path}") + except Exception as e: + raise Exception(f"Failed to commit and push changes: {str(e)}") +``` +```