feat(tier4): Add patch modal GUI integration and API hooks
This commit is contained in:
@@ -171,3 +171,22 @@ class ApiHookClient:
|
||||
def reset_session(self) -> None:
|
||||
"""Resets the current session via button click."""
|
||||
self.click("btn_reset")
|
||||
|
||||
def trigger_patch(self, patch_text: str, file_paths: list[str]) -> dict[str, Any]:
|
||||
"""Triggers the patch modal to show in the GUI."""
|
||||
return self._make_request('POST', '/api/patch/trigger', data={
|
||||
"patch_text": patch_text,
|
||||
"file_paths": file_paths
|
||||
}) or {}
|
||||
|
||||
def apply_patch(self) -> dict[str, Any]:
|
||||
"""Applies the pending patch."""
|
||||
return self._make_request('POST', '/api/patch/apply') or {}
|
||||
|
||||
def reject_patch(self) -> dict[str, Any]:
|
||||
"""Rejects the pending patch."""
|
||||
return self._make_request('POST', '/api/patch/reject') or {}
|
||||
|
||||
def get_patch_status(self) -> dict[str, Any]:
|
||||
"""Gets the current patch modal status."""
|
||||
return self._make_request('GET', '/api/patch/status') or {}
|
||||
|
||||
Reference in New Issue
Block a user