mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-21 15:12:26 +02:00
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>