Skip to content

Commit 7a0d119

Browse files
authored
Merge pull request #18 from gianpaj/patch-1
remove duplicate get_current_url() method
2 parents 80d04f2 + 8c5493e commit 7a0d119

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

cli.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
DockerComputer,
99
)
1010

11-
1211
def acknowledge_safety_check_callback(message: str) -> bool:
1312
response = input(
1413
f"Safety Check Warning: {message}\nDo you want to acknowledge and proceed? (y/n): "
@@ -80,7 +79,13 @@ def main():
8079
agent.computer.goto(args.start_url)
8180

8281
while True:
83-
user_input = args.input or input("> ")
82+
try:
83+
user_input = args.input or input("> ")
84+
if user_input == 'exit':
85+
break
86+
except EOFError as e:
87+
print(f"An error occurred: {e}")
88+
break
8489
items.append({"role": "user", "content": user_input})
8590
output_items = agent.run_full_turn(
8691
items,

computers/base_playwright.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,6 @@ def drag(self, path: List[Dict[str, int]]) -> None:
130130
self._page.mouse.move(point["x"], point["y"])
131131
self._page.mouse.up()
132132

133-
def get_current_url(self) -> str:
134-
return self._page.url
135-
136133
# --- Extra browser-oriented actions ---
137134
def goto(self, url: str) -> None:
138135
try:

0 commit comments

Comments
 (0)