feat(tier4): Add patch modal GUI integration and API hooks

This commit is contained in:
2026-03-07 00:37:44 -05:00
parent 90670b9671
commit 14dab8e67f
3 changed files with 194 additions and 0 deletions

View File

@@ -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 {}