Skip to content

Commit 77e5030

Browse files
committed
computer.display.view() method now returns all monotor screen has a collage
1 parent 3a2a82c commit 77e5030

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

interpreter/core/computer/display/display.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,17 +61,17 @@ def center(self):
6161
"""
6262
return self.width // 2, self.height // 2
6363

64-
def view(self, show=True, quadrant=None):
64+
def view(self, show=True, quadrant=None, all_screens=True):
6565
"""
6666
Redirects to self.screenshot
6767
"""
68-
return self.screenshot(show, quadrant)
68+
return self.screenshot(all_screens, show, quadrant )
6969

7070
# def get_active_window(self):
7171
# return get_active_window()
7272

7373
def screenshot(
74-
self, show=True, quadrant=None, active_app_only=False, force_image=False
74+
self,all_screens, show=True, quadrant=None, active_app_only=False, force_image=False,
7575
):
7676
"""
7777
Shows you what's on the screen by taking a screenshot of the entire screen or a specified quadrant. Returns a `pil_image` `in case you need it (rarely). **You almost always want to do this first!**
@@ -97,9 +97,9 @@ def screenshot(
9797
screenshot = pyautogui.screenshot(region=region)
9898
else:
9999
if platform.system() == "Darwin":
100-
screenshot = take_screenshot_to_pil()
100+
screenshot = take_screenshot_to_pil(all_screens=all_screens)
101101
else:
102-
screenshot = take_screenshot_to_pil() #function should work fine for windows too
102+
screenshot = take_screenshot_to_pil(all_screens=all_screens) #function should work fine for windows too
103103
# message = format_to_recipient("Taking a screenshot of the entire screen. This is not recommended. You (the language model assistant) will recieve it with low resolution.\n\nTo maximize performance, use computer.display.view(active_app_only=True). This will produce an ultra high quality image of the active application.", "assistant")
104104
# print(message)
105105

@@ -271,7 +271,7 @@ def get_text_as_list_of_lists(self, screenshot=None):
271271
from PIL import Image
272272

273273

274-
def take_screenshot_to_pil(all_screens=False):
274+
def take_screenshot_to_pil(all_screens=True):
275275
if all_screens:
276276
# Get information about all screens
277277
monitors = get_monitors()

0 commit comments

Comments
 (0)