addThought method

void addThought(
  1. ThoughtData thought
)

Implementation

void addThought(ThoughtData thought) {
  thoughtHistory.add(thought);

  if (thought.branchFromThought != null && thought.branchId != null) {
    branches.putIfAbsent(thought.branchId!, () => []).add(thought);
  }
}