diff --git a/agent.py b/agent.py index d263e3a..1ef4013 100644 --- a/agent.py +++ b/agent.py @@ -139,7 +139,7 @@ def handle_action(self, action: types.FunctionCall) -> FunctionResponseT: elif action.name == "type_text_at": x = self.denormalize_x(action.args["x"]) y = self.denormalize_y(action.args["y"]) - press_enter = action.args.get("press_enter", False) + press_enter = action.args.get("press_enter", True) clear_before_typing = action.args.get("clear_before_typing", True) return self._browser_computer.type_text_at( x=x, diff --git a/test_agent.py b/test_agent.py index c001493..f4f4be6 100644 --- a/test_agent.py +++ b/test_agent.py @@ -49,7 +49,7 @@ def test_handle_action_type_text_at(self): action = types.FunctionCall(name="type_text_at", args={"x": 100, "y": 200, "text": "hello"}) self.agent.handle_action(action) self.mock_browser_computer.type_text_at.assert_called_once_with( - x=100, y=200, text="hello", press_enter=False, clear_before_typing=True + x=100, y=200, text="hello", press_enter=True, clear_before_typing=True ) def test_handle_action_scroll_document(self):