Add WebLLM support, fix progress bar blocking at 90%, add timeout protection
This commit is contained in:
@@ -139,6 +139,16 @@ class OllamaTranslationProvider(TranslationProvider):
|
||||
return []
|
||||
|
||||
|
||||
class WebLLMTranslationProvider(TranslationProvider):
|
||||
"""WebLLM browser-based translation (client-side processing)"""
|
||||
|
||||
def translate(self, text: str, target_language: str, source_language: str = 'auto') -> str:
|
||||
# WebLLM translation happens client-side in the browser
|
||||
# This is just a placeholder - actual translation is done by JavaScript
|
||||
# For server-side, we'll just pass through for now
|
||||
return text
|
||||
|
||||
|
||||
class TranslationService:
|
||||
"""Main translation service that delegates to the configured provider"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user