You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 4b5d7ca
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: rlm/environments/docker_repl.py
+6Lines changed: 6 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -173,6 +173,12 @@ def SHOW_VARS():
173
173
finally:
174
174
sys.stdout, sys.stderr = old_stdout, old_stderr
175
175
176
+
# Restore scaffold aliases if overwritten by executed code
177
+
if "context_0" in _locals:
178
+
_locals["context"] = _locals["context_0"]
179
+
if "history_0" in _locals:
180
+
_locals["history"] = _locals["history_0"]
181
+
176
182
save_state(_locals)
177
183
print(json.dumps({{"stdout": stdout_buf.getvalue(), "stderr": stderr_buf.getvalue(), "locals": {{k: repr(v) for k, v in _locals.items() if not k.startswith("_")}}}}, ensure_ascii=False))
0 commit comments