Skip to content

Commit 91238ff

Browse files
committed
Tweak serialization
1 parent 9a3071c commit 91238ff

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

cursorless-talon/src/spoken_forms_output.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44

55
from talon import app
66

7-
from .command import CursorlessCommand
8-
9-
SPOKEN_FORMS_OUTPUT_PATH = Path.home() / ".cursorless" / "spokenForms.json"
7+
SPOKEN_FORMS_OUTPUT_PATH = Path.home() / ".cursorless" / "state.json"
8+
STATE_JSON_VERSION_NUMBER = 0
109

1110

1211
class SpokenFormEntry(TypedDict):
@@ -35,7 +34,10 @@ def write(self, spoken_forms: list[SpokenFormEntry]):
3534
try:
3635
out.write(
3736
json.dumps(
38-
{"version": CursorlessCommand.version, "entries": spoken_forms}
37+
{
38+
"version": STATE_JSON_VERSION_NUMBER,
39+
"spokenForms": spoken_forms,
40+
}
3941
)
4042
)
4143
except Exception:

0 commit comments

Comments
 (0)