Fix minor bugs caused from merging in setupcontroller; Initialize vscode example loading

This commit is contained in:
Timothyxxx
2024-01-14 00:51:26 +08:00
parent 347160a35f
commit 2228f346a9
14 changed files with 148 additions and 138 deletions

View File

@@ -1,7 +1,7 @@
from typing import List, Dict, Any
def get_replay(env, trajectory: List[Dict[str, Any]]) -> None:
def get_replay(env, trajectory: List[Dict[str, Any]]) -> None:
def parse(action):
if action["type"] == "hotkey":
keys = "', '".join(action["param"])
@@ -16,4 +16,4 @@ def get_replay(env, trajectory: List[Dict[str, Any]]) -> None:
return f"pyautogui.press('{key}')"
for action in trajectory:
env.controller.execute_python_command(parse(action))
env.controller.execute_python_command(parse(action))