refactor: scope ai backends

This commit is contained in:
mARTin-B78 2026-09-04 13:10:51 +02:00
parent 716e601fac
commit c53c47ce2d
5 changed files with 21 additions and 9 deletions

View File

@ -8,6 +8,8 @@ Follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/) · versioned wi
## [Unreleased]
### Changed
- **AI-backend namespace migration.** LLM snippets and backend interaction controls now live behind a private section scope
with an explicit `window.TTVC.aiBackends` API for cross-module snippet initialization.
- **Integrations namespace migration.** Endpoint helpers, active-voice listings, virtual design IDs, and API snippet
rendering now use a private scope with explicit compatibility exports and a `window.TTVC.integrations` API.
- **Combined-library namespace migration.** Production books/plays, Rehearser and Reader handoffs, and cast integration

View File

@ -1 +1 @@
1.24.81
1.24.82

View File

@ -71,6 +71,7 @@ Done incrementally as global-scope ordered files (no ES-module change needed)
- ✅ Engine browser, custom-card, and local-container helpers use a private scope with an explicit namespace API.
- ✅ Combined library production rendering and Reader/Rehearser handoffs use a private scope with an explicit namespace API.
- ✅ Integration endpoint and API-snippet helpers use a private scope with explicit voice/endpoint compatibility exports.
- ✅ AI-backend section interactions and snippet initialization use a private scope with an explicit namespace API.
- ✅ `static/css/resource-diagnostics.css` — isolated Performance/resource diagnostic panel styles.
- ✅ `static/css/background-jobs.css` — isolated background-job history and retry-panel styles.
- ✅ `static/css/voice-design.css` — isolated Voice Design form, samples, and preview-match styles.

View File

@ -10,7 +10,7 @@
<meta name="format-detection" content="telephone=no">
<meta name="color-scheme" content="light dark">
<meta name="theme-color" content="#2563EB">
<meta name="app-version" content="1.24.81">
<meta name="app-version" content="1.24.82">
<link rel="manifest" href="/manifest.webmanifest">
<link rel="icon" href="/static/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/static/icon.svg">
@ -27,12 +27,12 @@
<!-- ── Core styles (local — no CDN dependency for first paint) ────────── -->
<link rel="stylesheet" href="/static/vendor/mdi/materialdesignicons.min.css">
<link rel="stylesheet" href="/static/style.css?v=1.24.81">
<link rel="stylesheet" href="/static/css/resource-diagnostics.css?v=1.24.81">
<link rel="stylesheet" href="/static/css/background-jobs.css?v=1.24.81">
<link rel="stylesheet" href="/static/css/voice-design.css?v=1.24.81">
<link rel="stylesheet" href="/static/css/rehearser.css?v=1.24.81">
<link rel="stylesheet" href="/static/css/audiobook.css?v=1.24.81">
<link rel="stylesheet" href="/static/style.css?v=1.24.82">
<link rel="stylesheet" href="/static/css/resource-diagnostics.css?v=1.24.82">
<link rel="stylesheet" href="/static/css/background-jobs.css?v=1.24.82">
<link rel="stylesheet" href="/static/css/voice-design.css?v=1.24.82">
<link rel="stylesheet" href="/static/css/rehearser.css?v=1.24.82">
<link rel="stylesheet" href="/static/css/audiobook.css?v=1.24.82">
<!-- ── Flag icons — non-blocking (loaded async, icons appear after JS) ── -->
@ -397,7 +397,7 @@ window.toggleNavTree = function(treeId, chevronId) {
</script>
<!-- loader.js: fetches sections → loads JS modules → removes skeleton -->
<script src="/static/loader.js?v=1.24.81"></script>
<script src="/static/loader.js?v=1.24.82"></script>
</body>
</html>

View File

@ -1,5 +1,7 @@
// ── AI Backends section: copy, API keys, local service connect ─────────────
(function (root) {
(function initLlmsSection() {
// Copy buttons
@ -835,3 +837,10 @@ window.initCollapsibleCards();
});
});
})();
Object.assign(root, { initLlmSnippets });
root.TTVC = root.TTVC || {};
root.TTVC.aiBackends = root.TTVC.aiBackends || {};
root.TTVC.aiBackends.initSnippets = initLlmSnippets;
root.initLlmSnippets = initLlmSnippets;
})(window);