AI sections fall back to fetch with no Qt bridge, for non-React web frontends
ai_sections.html fetches {API_BASE}+path when window.qt is absent; a page-check case routes those requests to server_stub.dispatch(). AI SKILL.md step 6 and frontend.md send plain-HTML/Vue/Angular/Svelte projects to it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
344718007e
commit
461798127a
6 files changed
+100
-13
No files matched your search
@@ -63,13 +63,15 @@ def push_to(pg, event, data):
|
||||
pg.evaluate("([event, data]) => window.__pyMsg(JSON.stringify({event, data}))", [event, data])
|
||||
|
||||
|
||||
def open_page(browser, url, mode, init_script, expose=None):
|
||||
def open_page(browser, url, mode, init_script, expose=None, route=None):
|
||||
"""Generator for a `page` fixture: opens url in one mode, signs in through a login
|
||||
section if the page has one, switches to dark, and fails on any page script error."""
|
||||
width, height, dark = MODES[mode]
|
||||
ctx = browser.new_context(viewport={"width": width, "height": height})
|
||||
if expose:
|
||||
ctx.expose_function(*expose)
|
||||
if route:
|
||||
ctx.route(*route)
|
||||
ctx.add_init_script(init_script)
|
||||
pg = ctx.new_page()
|
||||
pg.set_default_timeout(5000)
|
||||
|
||||
Reference in new issue
Block a user