gemx 0.2.3__tar.gz → 0.2.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {gemx-0.2.3 → gemx-0.2.4}/PKG-INFO +1 -1
- {gemx-0.2.3 → gemx-0.2.4}/pyproject.toml +1 -1
- {gemx-0.2.3 → gemx-0.2.4}/src/gemx/__init__.py +1 -1
- {gemx-0.2.3 → gemx-0.2.4}/src/gemx/client.py +6 -2
- {gemx-0.2.3 → gemx-0.2.4}/.gitignore +0 -0
- {gemx-0.2.3 → gemx-0.2.4}/LICENSE +0 -0
- {gemx-0.2.3 → gemx-0.2.4}/README.md +0 -0
- {gemx-0.2.3 → gemx-0.2.4}/src/gemx/cli.py +0 -0
- {gemx-0.2.3 → gemx-0.2.4}/src/gemx/errors.py +0 -0
- {gemx-0.2.3 → gemx-0.2.4}/src/gemx/formats.py +0 -0
- {gemx-0.2.3 → gemx-0.2.4}/src/gemx/py.typed +0 -0
- {gemx-0.2.3 → gemx-0.2.4}/tests/__init__.py +0 -0
- {gemx-0.2.3 → gemx-0.2.4}/tests/scripts/TEST_GEMINI.md +0 -0
- {gemx-0.2.3 → gemx-0.2.4}/tests/scripts/gemini_console.js +0 -0
- {gemx-0.2.3 → gemx-0.2.4}/tests/scripts/gemini_console_prompt.js +0 -0
- {gemx-0.2.3 → gemx-0.2.4}/tests/test_cli.py +0 -0
- {gemx-0.2.3 → gemx-0.2.4}/tests/test_client.py +0 -0
- {gemx-0.2.3 → gemx-0.2.4}/tests/test_formats.py +0 -0
|
@@ -26,6 +26,7 @@ from pathlib import Path
|
|
|
26
26
|
from typing import Any, AsyncIterator
|
|
27
27
|
|
|
28
28
|
from playwright.async_api import Page, async_playwright
|
|
29
|
+
from playwright.async_api import TimeoutError as PlaywrightTimeoutError
|
|
29
30
|
|
|
30
31
|
from .errors import InputError, ProfileBusyError, ResponseTimeoutError
|
|
31
32
|
from .formats import OutputFormat, format_instruction, parse_output
|
|
@@ -352,7 +353,7 @@ class Gemx:
|
|
|
352
353
|
for attempt in range(1, attempts + 1):
|
|
353
354
|
try:
|
|
354
355
|
return await self._ask_raw_once(prompt, expected_format)
|
|
355
|
-
except ResponseTimeoutError:
|
|
356
|
+
except (ResponseTimeoutError, PlaywrightTimeoutError):
|
|
356
357
|
if attempt >= attempts:
|
|
357
358
|
raise
|
|
358
359
|
logger.warning(
|
|
@@ -436,7 +437,10 @@ class Gemx:
|
|
|
436
437
|
logger.debug("navigating to %s", GEMINI_URL)
|
|
437
438
|
await page.goto(GEMINI_URL, wait_until="load", timeout=cfg.nav_timeout_ms)
|
|
438
439
|
await page.wait_for_load_state("domcontentloaded")
|
|
439
|
-
|
|
440
|
+
try:
|
|
441
|
+
await page.wait_for_load_state("networkidle", timeout=30_000)
|
|
442
|
+
except PlaywrightTimeoutError:
|
|
443
|
+
logger.debug("network never went idle; continuing")
|
|
440
444
|
await page.wait_for_timeout(5_000)
|
|
441
445
|
|
|
442
446
|
await page.wait_for_timeout(cfg.post_load_settle_ms)
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|