MCPcopy Create free account
hub / github.com/CJackHwang/AIstudioProxyAPI / check_ui_generation_active

Function check_ui_generation_active

api_utils/utils_ext/stream.py:83–101  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

81 min_items_before_silence_check = 10
82
83 async def check_ui_generation_active():
84 if not page:
85 return False
86 try:
87 stop_button = page.locator('button[aria-label="Stop generating"]')
88 if await stop_button.is_visible(timeout=1000):
89 return True
90 from config.selectors import SUBMIT_BUTTON_SELECTOR
91
92 submit_button = page.locator(SUBMIT_BUTTON_SELECTOR)
93 if await submit_button.count() > 0:
94 try:
95 if await submit_button.first.is_disabled(timeout=2000):
96 return True
97 except Exception:
98 return False
99 return False
100 except Exception:
101 return False
102
103 try:
104 while True:

Callers 1

use_stream_responseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected