fix(sim): wire btn_approve_script and expose pending_script_approval in hook API
_handle_approve_script existed but was not registered in the click handler dict. _pending_dialog (PowerShell confirmation) was invisible to the hook API — only _pending_ask_dialog (MCP tool ask) was exposed. - gui_2.py: register btn_approve_script -> _handle_approve_script - api_hooks.py: add pending_script_approval field to mma_status response - visual_sim_mma_v2.py: _drain_approvals handles pending_script_approval Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -25,6 +25,10 @@ def _drain_approvals(client: ApiHookClient, status: dict) -> None:
|
||||
print('[SIM] Approving pending tool...')
|
||||
client.click('btn_approve_tool')
|
||||
time.sleep(0.5)
|
||||
elif status.get('pending_script_approval'):
|
||||
print('[SIM] Approving pending PowerShell script...')
|
||||
client.click('btn_approve_script')
|
||||
time.sleep(0.5)
|
||||
|
||||
|
||||
def _poll(client: ApiHookClient, timeout: int, condition, label: str) -> tuple[bool, dict]:
|
||||
|
||||
Reference in New Issue
Block a user