Finely scope repl events for runs and output clearing (#13872)

Sets up the `cmd-enter` keybinding for the jupyter repl to only apply
when enabled.

Release Notes:

- N/A

---------

Co-authored-by: Kirill <kirill@zed.dev>
This commit is contained in:
Kyle Kelley 2024-07-05 13:38:44 -07:00 committed by GitHub
parent 750df6c93d
commit 1c1fd6aaa1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 183 additions and 100 deletions

View file

@ -160,7 +160,11 @@ impl RunningKernel {
kernel_name: Some(format!("zed-{}", kernel_specification.name)),
};
let connection_path = dirs::runtime_dir().join(format!("kernel-zed-{entity_id}.json"));
let runtime_dir = dirs::runtime_dir();
fs.create_dir(&runtime_dir)
.await
.with_context(|| format!("Failed to create jupyter runtime dir {runtime_dir:?}"))?;
let connection_path = runtime_dir.join(format!("kernel-zed-{entity_id}.json"));
let content = serde_json::to_string(&connection_info)?;
// write out file to disk for kernel
fs.atomic_write(connection_path.clone(), content).await?;