perf: reduce editor drag lookup overhead

This commit is contained in:
OpenClaw Agent
2026-07-09 20:34:40 +00:00
parent 39af2b0150
commit 50664026a1
2 changed files with 40 additions and 28 deletions

View File

@@ -288,6 +288,9 @@ def _time_range_to_latent_indices(rel_start_frames: float, rel_length_frames: fl
def _preprocess_prompts_with_characters(global_prompt, local_prompts, char1="", char2="", char3=""):
"""Invisibly swaps out @character1/@char1 tags with their high-fidelity VLM descriptions."""
if "@" not in (global_prompt or "") and "@" not in (local_prompts or ""):
return global_prompt or "", local_prompts or ""
replacements = {}
for tags, value in zip(CHARACTER_TAG_GROUPS, (char1 or "", char2 or "", char3 or "")):
for tag in tags: