update 1. GTP-6 Astra, оптимизация кода и фикс

This commit is contained in:
2026-09-26 21:19:09 +03:00
parent 70fce14772
commit 22e10b53b7
31 changed files with 2211 additions and 162 deletions

View File

@@ -36,6 +36,7 @@ def install_ui_builder(
draft_filename: str = "ui_builder_draft.json",
published_filename: str = "ui_builder_published.json",
custom_script_urls: list[str] | None = None,
custom_early_script_urls: list[str] | None = None,
custom_style_urls: list[str] | None = None,
) -> UIBuilderManager:
"""Install published runtime and PIN-protected editor."""
@@ -116,6 +117,9 @@ def install_ui_builder(
.replace("__UI_BUILDER_RUNTIME__", runtime_url)
.replace("__UI_BUILDER_MODE__", mode)
.replace("__UI_BUILDER_EDITOR_HOTKEY__", "Ctrl+Shift+E")
.replace("__UI_BUILDER_EARLY_SCRIPTS__", "\n".join(
f'<script src="{url}"></script>' for url in (custom_early_script_urls or [])
))
.replace(
"__UI_BUILDER_CUSTOM_STYLES__",
"\n".join(