|
27 | 27 | from askui.models.shared.settings import LocateSettings |
28 | 28 | from askui.models.types.geometry import PointList |
29 | 29 | from askui.reporting import Reporter, SimpleHtmlReporter |
30 | | -from askui.tools.toolbox import AgentToolbox |
| 30 | +from askui.tools.agent_os import AgentOs |
31 | 31 | from askui.utils.image_utils import ImageSource |
32 | 32 |
|
33 | 33 |
|
@@ -98,75 +98,70 @@ def combo_locate_model(path_fixtures: pathlib.Path) -> LocateModel: |
98 | 98 | @pytest.fixture |
99 | 99 | def agent_with_pta_model( |
100 | 100 | pta_locate_model: LocateModel, |
101 | | - agent_toolbox_mock: AgentToolbox, |
| 101 | + agent_os_mock_patch: AgentOs, # noqa: ARG001 |
102 | 102 | simple_html_reporter: Reporter, |
103 | 103 | ) -> Generator[ComputerAgent, None, None]: |
104 | 104 | with ComputerAgent( |
105 | 105 | settings=AgentSettings( |
106 | 106 | detection_provider=_LocateModelDetectionProvider(pta_locate_model) |
107 | 107 | ), |
108 | 108 | reporters=[simple_html_reporter], |
109 | | - tools=agent_toolbox_mock, |
110 | 109 | ) as agent: |
111 | 110 | yield agent |
112 | 111 |
|
113 | 112 |
|
114 | 113 | @pytest.fixture |
115 | 114 | def agent_with_ocr_model( |
116 | 115 | ocr_locate_model: LocateModel, |
117 | | - agent_toolbox_mock: AgentToolbox, |
| 116 | + agent_os_mock_patch: AgentOs, # noqa: ARG001 |
118 | 117 | simple_html_reporter: Reporter, |
119 | 118 | ) -> Generator[ComputerAgent, None, None]: |
120 | 119 | with ComputerAgent( |
121 | 120 | settings=AgentSettings( |
122 | 121 | detection_provider=_LocateModelDetectionProvider(ocr_locate_model) |
123 | 122 | ), |
124 | 123 | reporters=[simple_html_reporter], |
125 | | - tools=agent_toolbox_mock, |
126 | 124 | ) as agent: |
127 | 125 | yield agent |
128 | 126 |
|
129 | 127 |
|
130 | 128 | @pytest.fixture |
131 | 129 | def agent_with_ai_element_model( |
132 | 130 | ai_element_locate_model: LocateModel, |
133 | | - agent_toolbox_mock: AgentToolbox, |
| 131 | + agent_os_mock_patch: AgentOs, # noqa: ARG001 |
134 | 132 | simple_html_reporter: Reporter, |
135 | 133 | ) -> Generator[ComputerAgent, None, None]: |
136 | 134 | with ComputerAgent( |
137 | 135 | settings=AgentSettings( |
138 | 136 | detection_provider=_LocateModelDetectionProvider(ai_element_locate_model) |
139 | 137 | ), |
140 | 138 | reporters=[simple_html_reporter], |
141 | | - tools=agent_toolbox_mock, |
142 | 139 | ) as agent: |
143 | 140 | yield agent |
144 | 141 |
|
145 | 142 |
|
146 | 143 | @pytest.fixture |
147 | 144 | def agent_with_combo_model( |
148 | 145 | combo_locate_model: LocateModel, |
149 | | - agent_toolbox_mock: AgentToolbox, |
| 146 | + agent_os_mock_patch: AgentOs, # noqa: ARG001 |
150 | 147 | simple_html_reporter: Reporter, |
151 | 148 | ) -> Generator[ComputerAgent, None, None]: |
152 | 149 | with ComputerAgent( |
153 | 150 | settings=AgentSettings( |
154 | 151 | detection_provider=_LocateModelDetectionProvider(combo_locate_model) |
155 | 152 | ), |
156 | 153 | reporters=[simple_html_reporter], |
157 | | - tools=agent_toolbox_mock, |
158 | 154 | ) as agent: |
159 | 155 | yield agent |
160 | 156 |
|
161 | 157 |
|
162 | 158 | @pytest.fixture |
163 | 159 | def vision_agent( |
164 | | - agent_toolbox_mock: AgentToolbox, |
| 160 | + agent_os_mock_patch: AgentOs, # noqa: ARG001 |
165 | 161 | simple_html_reporter: Reporter, |
166 | 162 | ) -> Generator[ComputerAgent, None, None]: |
167 | 163 | """Fixture providing a ComputerAgent instance.""" |
168 | 164 | with ComputerAgent( |
169 | 165 | reporters=[simple_html_reporter], |
170 | | - tools=agent_toolbox_mock, |
171 | 166 | ) as agent: |
172 | 167 | yield agent |
0 commit comments