Files
langgraph/libs
Sydney RunkleandClaude Opus 4.7 4f01115fa8 refactor(add_messages): clearer step-by-step structure
Restructure add_messages so fast vs. slow path, REMOVE_ALL handling,
and format application each live in a single numbered section with a
short lead-in comment. No behavior changes; the previous commits'
optimizations are preserved.

- fold the two path branches into one `if pure_append else slow_path`
  so format handling happens at a single exit instead of being
  duplicated between fast and slow paths
- drop the now-redundant `left_seq` local; index `left` directly after
  the coerce step (with a single `cast(list, left)` for the type
  checker)
- use `set.isdisjoint` for the overlap check

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-24 07:31:03 -04:00
..
2026-04-24 07:29:52 -04:00