(action, session)
| 201 | original_act = tools.act |
| 202 | |
| 203 | async def wrapped_act(action, session): |
| 204 | result = await original_act(action, session) |
| 205 | # Capture state after each action |
| 206 | action_type = 'unknown' |
| 207 | if hasattr(action, 'input_text') and action.input_text: |
| 208 | action_type = 'input_text' |
| 209 | await asyncio.sleep(1) # Give time for DOM to update |
| 210 | state = await capture_dom_state('AFTER INPUT_TEXT') |
| 211 | states.append(state) |
| 212 | elif hasattr(action, 'scroll') and action.scroll: |
| 213 | action_type = 'scroll' |
| 214 | await asyncio.sleep(2) # Give more time after scroll |
| 215 | state = await capture_dom_state('AFTER SCROLL') |
| 216 | states.append(state) |
| 217 | return result |
| 218 | |
| 219 | tools.act = wrapped_act |
| 220 |
nothing calls this directly
no test coverage detected
searching dependent graphs…