Add repl events (#15259)

Release Notes:

- N/A

---------

Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
This commit is contained in:
Joseph T. Lyons 2024-07-26 03:31:41 -04:00 committed by GitHub
parent 745d2e4d3b
commit 856d9632e4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 190 additions and 37 deletions

View file

@ -42,12 +42,15 @@ pub fn run(editor: WeakView<Editor>, cx: &mut WindowContext) -> Result<()> {
})?;
let fs = store.read(cx).fs().clone();
let telemetry = store.read(cx).telemetry().clone();
let session = if let Some(session) = store.read(cx).get_session(editor.entity_id()).cloned()
{
session
} else {
let weak_editor = editor.downgrade();
let session = cx.new_view(|cx| Session::new(weak_editor, fs, kernel_specification, cx));
let session = cx
.new_view(|cx| Session::new(weak_editor, fs, telemetry, kernel_specification, cx));
editor.update(cx, |_editor, cx| {
cx.notify();