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
fix: remove codebase reset call, and fix async bug (#541)
# Motivation
<!-- Why is this change necessary? -->
# Content
<!-- Please include a summary of the change -->
# Testing
<!-- How was the change tested? -->
# Please check the following before marking your PR as ready for review
- [ ] I have added tests for my changes
- [ ] I have updated the documentation or added new documentation as
needed
---------
Co-authored-by: rushilpatel0 <[email protected]>
return {"message": "Codebase parsing initiated, this may take some time depending on the size of the codebase. Use the `check_parsing_status` tool to check if the parse has completed."}
53
-
return {"message": "Codebase is already being parsed."}
61
+
return {"message": "Codebase is already being parsed.", "status": "error"}
54
62
55
63
56
64
@mcp.tool(name="check_parse_status", description="Check if codebase parsing has completed")
@@ -69,17 +77,19 @@ async def execute_codemod(codemod: Annotated[str, "The python codemod code to ex
69
77
70
78
try:
71
79
awaitstate.parse_task
72
-
# TODO: Implement proper sandboxing for code execution
73
-
context= {
74
-
"codebase": state.parsed_codebase,
75
-
"print": capture_output,
76
-
}
77
-
exec(codemod, context)
80
+
ifstate.parsed_codebaseisNone:
81
+
return {"error": "Codebase path is not set."}
82
+
else:
83
+
# TODO: Implement proper sandboxing for code execution
0 commit comments