From 81120fecedd8ba1a87a28101f83feef1f3168f4a Mon Sep 17 00:00:00 2001 From: Andreas Arvidsson Date: Sat, 7 Mar 2026 16:45:01 +0100 Subject: [PATCH] Make command type more robust in case phrase is missing --- cursorless-talon/src/command.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cursorless-talon/src/command.py b/cursorless-talon/src/command.py index 7e5c7a2e3e..94ffd25eb2 100644 --- a/cursorless-talon/src/command.py +++ b/cursorless-talon/src/command.py @@ -10,7 +10,7 @@ @dataclasses.dataclass class CursorlessCommand: version = COMMAND_VERSION - spokenForm: str + spokenForm: str | None usePrePhraseSnapshot: bool action: dict @@ -66,7 +66,7 @@ def construct_cursorless_command(action: dict) -> dict: except KeyError: use_pre_phrase_snapshot = False - spoken_form = " ".join(last_phrase["phrase"]) + spoken_form = " ".join(last_phrase["phrase"]) if "phrase" in last_phrase else None return make_serializable( CursorlessCommand(