Feature/insight chat branching #109
@@ -2511,8 +2511,10 @@ fn render_tree_path(
|
||||
std::collections::VecDeque::new();
|
||||
let mut node_ids: Vec<u64> = Vec::new();
|
||||
let mut fork_info: Vec<Option<ForkInfo>> = Vec::new();
|
||||
// Nearest divergence seen so far, carried forward across nodes (rendered or
|
||||
// not) so every message at/after a fork shows the indicator.
|
||||
// Nearest divergence seen so far, carried forward across non-rendered
|
||||
// nodes (e.g. tool-dispatch) so the fork is attributed to the next
|
||||
// rendered message. Cleared after the first rendered message consumes it,
|
||||
// so the chip appears only at the actual divergence point.
|
||||
let mut last_fork: Option<ForkInfo> = None;
|
||||
|
||||
for node in path {
|
||||
@@ -2571,9 +2573,9 @@ fn render_tree_path(
|
||||
tools,
|
||||
});
|
||||
node_ids.push(node.id);
|
||||
fork_info.push(last_fork.clone());
|
||||
fork_info.push(last_fork.take());
|
||||
}
|
||||
"user" => {
|
||||
"user" => {
|
||||
let is_initial = user_turns_seen == 0;
|
||||
user_turns_seen += 1;
|
||||
pending_tools.clear();
|
||||
@@ -2585,7 +2587,7 @@ fn render_tree_path(
|
||||
tools: Vec::new(),
|
||||
});
|
||||
node_ids.push(node.id);
|
||||
fork_info.push(last_fork.clone());
|
||||
fork_info.push(last_fork.take());
|
||||
}
|
||||
_ => continue,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user