"""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()