repl: Process display IDs for updatable displays (#15738)

Release Notes:

- Added `update_display_data` support for REPL.


https://github.com/user-attachments/assets/d618e457-e314-482e-954a-6384f185629a
This commit is contained in:
Kyle Kelley 2024-08-03 08:15:36 -07:00 committed by GitHub
parent 68446d2ed1
commit 36b61a8b87
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 105 additions and 34 deletions

View file

@ -549,6 +549,20 @@ impl Session {
self.kernel.set_kernel_info(&reply);
cx.notify();
}
JupyterMessageContent::UpdateDisplayData(update) => {
let display_id = if let Some(display_id) = update.transient.display_id.clone() {
display_id
} else {
return;
};
self.blocks.iter_mut().for_each(|(_, block)| {
block.execution_view.update(cx, |execution_view, cx| {
execution_view.update_display_data(&update.data, &display_id, cx);
});
});
return;
}
_ => {}
}