fix(editor): harden bridge isolation and completion semantics

This commit is contained in:
Alexandre Teixeira
2026-10-27 15:36:17 +00:00
parent 020fe02aa0
commit d105fbde95
19 changed files with 1037 additions and 205 deletions
+8
View File
@@ -22,6 +22,14 @@ def test_recolor_phrase_cleanup_handles_long_whitespace(prompt, target, expected
assert guide._recolor_object_phrase(prompt, target) == expected
def test_recolor_phrase_cleanup_handles_many_trailing_adjectives():
# Repeated regex substitutions previously rescanned the whole string for
# every adjective; this input would take minutes rather than linear time.
prompt = 'make the red car blue ' + 'bright ' * 100_000
assert guide._recolor_object_phrase(prompt, 'blue') == 'red car'
assert guide._recolor_object_phrase('make bright', '') == 'bright'
@pytest.fixture(autouse=True)
def _reset_planner():
eaar.set_editor_planner(None)