Skip to content
This repository was archived by the owner on Oct 6, 2025. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions bin/handle_adapter_text.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,19 @@ def main() -> None:
handled = False
for line in stdout.splitlines():
line = line.strip()
if line:
write_event(Handled(text=line).event())
if not line:
continue
if not line.endswith(('.', ',', ':', '?', ';')):
line = line + "."
if not handled:
text = line
handled = True
break
else:
text = text + " " + line

if not handled:
if handled:
write_event(Handled(text=text).event())
else:
write_event(NotHandled().event())

break
Expand Down