diff --git a/README.md b/README.md index a4bdbe0..13c6628 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@

WebsitePaper • + DocDataData ViewerDiscord diff --git a/desktop_env/controllers/setup.py b/desktop_env/controllers/setup.py index 3bacb25..7604d11 100644 --- a/desktop_env/controllers/setup.py +++ b/desktop_env/controllers/setup.py @@ -580,11 +580,33 @@ class SetupController: return browser, context def _update_browse_history_setup(self, **config): - db_path = os.path.join("desktop_env", "assets", "history_empty.sqlite") - - # copy a new history file in the tmp folder cache_path = os.path.join(self.cache_dir, "history_new.sqlite") - shutil.copyfile(db_path, cache_path) + db_url = "https://drive.usercontent.google.com/u/0/uc?id=1Lv74QkJYDWVX0RIgg0Co-DUcoYpVL0oX&export=download" # google drive + if not os.path.exists(cache_path): + max_retries = 3 + downloaded = False + e = None + for i in range(max_retries): + try: + response = requests.get(db_url, stream=True) + response.raise_for_status() + + with open(cache_path, 'wb') as f: + for chunk in response.iter_content(chunk_size=8192): + if chunk: + f.write(chunk) + logger.info("File downloaded successfully") + downloaded = True + break + + except requests.RequestException as e: + logger.error( + f"Failed to download {db_url} caused by {e}. Retrying... ({max_retries - i - 1} attempts left)") + if not downloaded: + raise requests.RequestException(f"Failed to download {db_url}. No retries left. Error: {e}") + else: + logger.info("File already exists in cache directory") + # copy a new history file in the tmp folder db_path = cache_path history = config['history'] @@ -632,9 +654,14 @@ class SetupController: """import os; print(os.path.join(os.getenv('HOME'), "Library", "Application Support", "Google", "Chrome", "Default", "History"))""")[ 'output'].strip() elif os_type == 'Linux': - chrome_history_path = controller.execute_python_command( - "import os; print(os.path.join(os.getenv('HOME'), '.config', 'google-chrome', 'Default', 'History'))")[ - 'output'].strip() + if "arm" in platform.machine(): + chrome_history_path = controller.execute_python_command( + "import os; print(os.path.join(os.getenv('HOME'), 'snap', 'chromium', 'common', 'chromium', 'Default', 'History'))")[ + 'output'].strip() + else: + chrome_history_path = controller.execute_python_command( + "import os; print(os.path.join(os.getenv('HOME'), '.config', 'google-chrome', 'Default', 'History'))")[ + 'output'].strip() else: raise Exception('Unsupported operating system') diff --git a/desktop_env/providers/aws/AWS_GUIDELINE.md b/desktop_env/providers/aws/AWS_GUIDELINE.md index 1029b43..d45ed0b 100644 --- a/desktop_env/providers/aws/AWS_GUIDELINE.md +++ b/desktop_env/providers/aws/AWS_GUIDELINE.md @@ -15,7 +15,8 @@ You need to assign values to several variables crucial for the operation of thes - Formatted as follows: ```python IMAGE_ID_MAP = { - "us-east-1": "ami-09bab251951b4272c", + "us-east-1": "ami-019f92c05df45031b", + "ap-east-1": "ami-07b4956131da1b282" # Add other regions and corresponding AMIs } ``` diff --git a/evaluation_examples/examples/libreoffice_impress/0a211154-fda0-48d0-9274-eaac4ce5486d.json b/evaluation_examples/examples/libreoffice_impress/0a211154-fda0-48d0-9274-eaac4ce5486d.json index 13c449e..7ece359 100644 --- a/evaluation_examples/examples/libreoffice_impress/0a211154-fda0-48d0-9274-eaac4ce5486d.json +++ b/evaluation_examples/examples/libreoffice_impress/0a211154-fda0-48d0-9274-eaac4ce5486d.json @@ -61,7 +61,7 @@ "func": "compare_pptx_files", "expected": { "type": "cloud_file", - "path": "https://drive.usercontent.google.com/download?id=1W6yRtc3Z6lGBdwvGqoU4CC20TDKw1Pdq&export=download&authuser=0&confirm=t&uuid=a20dc92d-9d78-4c32-ad3b-a2fd068fd167&at=APZUnTWUSZoFc5RheJ8QOwadHnjF:1709110061143", + "path": "https://drive.usercontent.google.com/download?id=1W6yRtc3Z6lGBdwvGqoU4CC20TDKw1Pdq&export=download&authuser=0&confirm=t&uuid=157e59b1-5b50-48a5-a9bc-aaa1e5d3c5bb&at=APZUnTXLw32ithWfa1jMREjb6Aaa:1720111552480", "dest": "13_0_Gold.pptx" }, "result": { @@ -73,4 +73,4 @@ "examine_shape": false } } -} \ No newline at end of file +}