agent window: a site's relay stands in for the endpoint it relays
Deploy web Studio / deploy (push) Successful in 3m53s
Deploy web Studio / deploy (push) Successful in 3m53s
On isokit.buildfor.life, entering https://inference.p0.contact/v1 in the agent window's settings made the page call the inference server directly, which browsers refuse (its nginx answers the CORS preflight with 401): "The browser could not reach ... (Failed to fetch)". - the relay meta names its upstream (data-upstream; build_web.py --agent-upstream, the deploy passes the inference server): that URL now goes through the relay and is saved as "follow the site's default" - an unreachable endpoint says what to do: the relay's URL on a site with one, else isokit studio or isokit.buildfor.life - check_web.py: relayed upstream and the unreachable message
This commit is contained in:
1 parent
1a1b62d475
commit
41554801ea
4 files changed
+65
-11
No files matched your search
+5
-2
@@ -113,7 +113,9 @@ def main():
|
||||
ap = argparse.ArgumentParser(description=__doc__, formatter_class=argparse.RawDescriptionHelpFormatter)
|
||||
ap.add_argument("--out", default=str(ROOT / "dist" / "web"))
|
||||
ap.add_argument("--skip-cargo", action="store_true", help="reuse the last WASM build (front-end changes only)")
|
||||
ap.add_argument("--agent-url", help="default endpoint of the agent window, e.g. a relay on the same site (/llm/v1)")
|
||||
ap.add_argument("--agent-url", help="default endpoint of the agent window: a relay on the same site (/llm/v1)")
|
||||
ap.add_argument("--agent-upstream", default="https://inference.p0.contact/v1",
|
||||
help="the endpoint that --agent-url relays to; entered in the window, it goes through the relay")
|
||||
a = ap.parse_args()
|
||||
out = Path(a.out).resolve()
|
||||
web = out / "assets" / "web"
|
||||
@@ -157,7 +159,8 @@ def main():
|
||||
html = replace_once(html, '<title>isokit Studio</title>',
|
||||
'<title>isokit Studio</title>\n<meta name="description" content="isokit Studio: edit isometric site plans in the browser.">'
|
||||
+ (f'\n<meta name="isokit-build" content="{build}">' if build else "")
|
||||
+ (f'\n<meta name="isokit-agent" content="{html_attr(a.agent_url)}">' if a.agent_url else ""))
|
||||
+ (f'\n<meta name="isokit-agent" content="{html_attr(a.agent_url)}" data-upstream="{html_attr(a.agent_upstream)}">'
|
||||
if a.agent_url else ""))
|
||||
html = replace_once(html, 'href="/assets/studio/favicon.svg"', f'href="assets/studio/favicon.svg?{v}"')
|
||||
html = replace_once(html, 'href="/assets/viewer/isokit-view.css"', f'href="assets/viewer/isokit-view.css?{v}"')
|
||||
html = replace_once(html, '<link rel="stylesheet" href="/assets/theme.css">', '<style id="iso-theme"></style>')
|
||||
|
||||
Reference in new issue
Block a user