Spaces:
Running
Running
Do not zero out positions in the JSON.
Browse files
lynxkite-app/src/lynxkite/app/crdt.py
CHANGED
@@ -134,10 +134,11 @@ async def workspace_changed(name, changes, ws_crdt):
|
|
134 |
ws_pyd = workspace.Workspace.model_validate(ws_crdt.to_py())
|
135 |
# Do not trigger execution for superficial changes.
|
136 |
# This is a quick solution until we build proper caching.
|
137 |
-
|
138 |
-
|
|
|
139 |
return
|
140 |
-
last_known_versions[name] =
|
141 |
# Frontend changes that result from typing are delayed to avoid
|
142 |
# rerunning the workspace for every keystroke.
|
143 |
if name in delayed_executions:
|
|
|
134 |
ws_pyd = workspace.Workspace.model_validate(ws_crdt.to_py())
|
135 |
# Do not trigger execution for superficial changes.
|
136 |
# This is a quick solution until we build proper caching.
|
137 |
+
ws_simple = ws_pyd.model_copy(deep=True)
|
138 |
+
clean_input(ws_simple)
|
139 |
+
if ws_simple == last_known_versions.get(name):
|
140 |
return
|
141 |
+
last_known_versions[name] = ws_simple
|
142 |
# Frontend changes that result from typing are delayed to avoid
|
143 |
# rerunning the workspace for every keystroke.
|
144 |
if name in delayed_executions:
|