Skip to content

Commit d706a11

Browse files
committed
fix: PR#12 stability hotfix
1 parent b2d4967 commit d706a11

3 files changed

Lines changed: 6 additions & 3 deletions

File tree

src/api/app.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ async def _start_stream_proxy():
9999
server.logger.info(f'STREAM proxy port {current_port} is ready.')
100100
if current_port != port:
101101
server.logger.warning(f'STREAM proxy using fallback port {current_port} (requested {port}).')
102+
if server.PLAYWRIGHT_PROXY_SETTINGS and 'server' in server.PLAYWRIGHT_PROXY_SETTINGS:
103+
server.PLAYWRIGHT_PROXY_SETTINGS['server'] = f'http://127.0.0.1:{current_port}/'
104+
server.logger.info(f'Updated Playwright proxy to actual STREAM port: {current_port}')
102105
return
103106
else:
104107
server.logger.warning(f'STREAM proxy port {current_port} not ready, killing process...')

src/browser/page_controller.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1248,15 +1248,15 @@ async def _try_shortcut_submit(self, prompt_textarea_locator, check_client_disco
12481248
original_content = await prompt_textarea_locator.input_value(timeout=2000) or ''
12491249
self.logger.info(f'[{self.req_id}] - Attempting {shortcut_modifier}+Enter...')
12501250
await self.page.keyboard.press(f'{shortcut_modifier}+Enter')
1251-
await asyncio.sleep(2.5)
1251+
await asyncio.sleep(1.5)
12521252
if await self._verify_submission(prompt_textarea_locator, original_content):
12531253
self.logger.info(f'[{self.req_id}] ✅ Success with {shortcut_modifier}+Enter.')
12541254
return True
12551255
self.logger.warning(f'[{self.req_id}] - {shortcut_modifier}+Enter submission failed verification.')
12561256
self.logger.info(f'[{self.req_id}] - Attempting Enter...')
12571257
await prompt_textarea_locator.focus(timeout=5000)
12581258
await self.page.keyboard.press('Enter')
1259-
await asyncio.sleep(2.5)
1259+
await asyncio.sleep(1.5)
12601260
if await self._verify_submission(prompt_textarea_locator, original_content):
12611261
self.logger.info(f'[{self.req_id}] ✅ Success with Enter.')
12621262
return True

src/config/timeouts.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
SLEEP_TICK = 0.1
2626
SLEEP_SHORT = 0.15
2727
SLEEP_MEDIUM = 0.25
28-
SLEEP_LONG = 1.0
28+
SLEEP_LONG = 0.5
2929
SLEEP_RETRY = 1.0
3030
SLEEP_NAVIGATION = 2.0
3131
SLEEP_VIDEO_POLL = 5.0

0 commit comments

Comments
 (0)