v3.1.4: Fix WebLLMService undefined - use window attached class pattern
Some checks failed
Docker Build & Push / build (push) Has been cancelled

This commit is contained in:
KV-Tube Deployer 2026-01-20 07:35:37 +07:00
parent 79f69772a0
commit 249e4ca415

View file

@ -4,9 +4,9 @@
*/
// Guard against redeclaration on SPA navigation
if (typeof WebLLMService === 'undefined') {
if (typeof window.WebLLMService === 'undefined') {
class WebLLMService {
window.WebLLMService = class WebLLMService {
constructor() {
this.engine = null;
this.isLoading = false;
@ -335,7 +335,7 @@ Do NOT copy sentences from the transcript. Instead, synthesize the core ideas in
}
// Global singleton instance
window.webLLMService = new WebLLMService();
window.webLLMService = new window.WebLLMService();
// Export for module usage
if (typeof module !== 'undefined' && module.exports) {