buildContextMessages method
Rebuilds the model context from the active branch: messages in branch
order, with compaction, branch-summary, and custom-message records
projected per pi's buildSessionContext + convertToLlm.
Implementation
Future<List<Message>> buildContextMessages() async {
final path = await getBranch();
final (kept, dropped) = _applyCompactionTransform(path);
return _projectMessages(kept, classicHidden: dropped);
}