Stick REPL icon in quick action bar (#14064)
REPL Quick Actions <img width="325" alt="image" src="https://github.com/zed-industries/zed/assets/836375/faaf4c8f-ef12-4417-a9dd-158d5beae8ba"> When the Jupyter REPL is enabled and a kernel is available, show the status in the editor bar:  Release Notes: - N/A --------- Co-authored-by: Nate Butler <iamnbutler@gmail.com>
This commit is contained in:
parent
9282bf97ae
commit
896b9bda23
15 changed files with 345 additions and 16 deletions
|
@ -22,11 +22,11 @@ use theme::{ActiveTheme, ThemeSettings};
|
|||
use ui::{h_flex, prelude::*, v_flex, ButtonLike, ButtonStyle, Label};
|
||||
|
||||
pub struct Session {
|
||||
editor: WeakView<Editor>,
|
||||
kernel: Kernel,
|
||||
pub editor: WeakView<Editor>,
|
||||
pub kernel: Kernel,
|
||||
blocks: HashMap<String, EditorBlock>,
|
||||
messaging_task: Task<()>,
|
||||
kernel_specification: KernelSpecification,
|
||||
pub messaging_task: Task<()>,
|
||||
pub kernel_specification: KernelSpecification,
|
||||
}
|
||||
|
||||
struct EditorBlock {
|
||||
|
@ -310,7 +310,7 @@ impl Session {
|
|||
}
|
||||
}
|
||||
|
||||
fn interrupt(&mut self, cx: &mut ViewContext<Self>) {
|
||||
pub fn interrupt(&mut self, cx: &mut ViewContext<Self>) {
|
||||
match &mut self.kernel {
|
||||
Kernel::RunningKernel(_kernel) => {
|
||||
self.send(InterruptRequest {}.into(), cx).ok();
|
||||
|
@ -322,7 +322,7 @@ impl Session {
|
|||
}
|
||||
}
|
||||
|
||||
fn shutdown(&mut self, cx: &mut ViewContext<Self>) {
|
||||
pub fn shutdown(&mut self, cx: &mut ViewContext<Self>) {
|
||||
let kernel = std::mem::replace(&mut self.kernel, Kernel::ShuttingDown);
|
||||
|
||||
match kernel {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue