b47045ab9b
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
20 lines
573 B
Python
20 lines
573 B
Python
"""Text-Einfügung — plattformspezifische Backends hinter gemeinsamem Interface."""
|
|
|
|
import sys
|
|
from typing import Protocol, runtime_checkable
|
|
|
|
|
|
@runtime_checkable
|
|
class Inserter(Protocol):
|
|
async def insert(self, text: str) -> None: ...
|
|
|
|
|
|
def create_inserter() -> Inserter:
|
|
"""Erstellt den plattformspezifischen Inserter."""
|
|
if sys.platform == "linux":
|
|
from whisper_local.inserter._wayland import WaylandInserter
|
|
return WaylandInserter()
|
|
else:
|
|
from whisper_local.inserter._win32 import Win32Inserter
|
|
return Win32Inserter()
|