fix anthropic key action parser (#2266)

This commit is contained in:
Shuchang Zheng
2025-04-30 21:20:51 -07:00
committed by GitHub
parent 38f8a21d32
commit bf928c08c2

View File

@@ -499,8 +499,8 @@ async def parse_anthropic_actions(
)
idx += 1
continue
text = text.capitalize()
response = f"Press keys: {text}"
keys = text.split("+")
hold = action == "hold_key"
duration = tool_call_input.get("duration", 0)
if hold:
@@ -509,7 +509,7 @@ async def parse_anthropic_actions(
actions.append(
KeypressAction(
element_id="",
keys=[text],
keys=keys,
hold=hold,
duration=duration,
reasoning=reasoning,