lib.rs

  1use gpui::{Action, actions};
  2use schemars::JsonSchema;
  3use serde::{Deserialize, Serialize};
  4
  5// If the zed binary doesn't use anything in this crate, it will be optimized away
  6// and the actions won't initialize. So we just provide an empty initialization function
  7// to be called from main.
  8//
  9// These may provide relevant context:
 10// https://github.com/rust-lang/rust/issues/47384
 11// https://github.com/mmastrac/rust-ctor/issues/280
 12pub fn init() {}
 13
 14/// Opens a URL in the system's default web browser.
 15#[derive(Clone, PartialEq, Deserialize, JsonSchema, Action)]
 16#[action(namespace = zed)]
 17#[serde(deny_unknown_fields)]
 18pub struct OpenBrowser {
 19    pub url: String,
 20}
 21
 22/// Opens a zed:// URL within the application.
 23#[derive(Clone, PartialEq, Deserialize, JsonSchema, Action)]
 24#[action(namespace = zed)]
 25#[serde(deny_unknown_fields)]
 26pub struct OpenZedUrl {
 27    pub url: String,
 28}
 29
 30/// Opens the keymap to either add a keybinding or change an existing one
 31#[derive(PartialEq, Clone, Default, Action, JsonSchema, Serialize, Deserialize)]
 32#[action(namespace = zed, no_json, no_register)]
 33pub struct ChangeKeybinding {
 34    pub action: String,
 35}
 36
 37actions!(
 38    zed,
 39    [
 40        /// Opens the settings editor.
 41        #[action(deprecated_aliases = ["zed_actions::OpenSettingsEditor"])]
 42        OpenSettings,
 43        /// Opens the settings JSON file.
 44        #[action(deprecated_aliases = ["zed_actions::OpenSettings"])]
 45        OpenSettingsFile,
 46        /// Opens project-specific settings.
 47        #[action(deprecated_aliases = ["zed_actions::OpenProjectSettings"])]
 48        OpenProjectSettings,
 49        /// Opens the default keymap file.
 50        OpenDefaultKeymap,
 51        /// Opens the user keymap file.
 52        #[action(deprecated_aliases = ["zed_actions::OpenKeymap"])]
 53        OpenKeymapFile,
 54        /// Opens the keymap editor.
 55        #[action(deprecated_aliases = ["zed_actions::OpenKeymapEditor"])]
 56        OpenKeymap,
 57        /// Opens account settings.
 58        OpenAccountSettings,
 59        /// Opens server settings.
 60        OpenServerSettings,
 61        /// Quits the application.
 62        Quit,
 63        /// Shows information about Zed.
 64        About,
 65        /// Opens the documentation website.
 66        OpenDocs,
 67        /// Views open source licenses.
 68        OpenLicenses,
 69        /// Opens the telemetry log.
 70        OpenTelemetryLog,
 71        /// Opens the performance profiler.
 72        OpenPerformanceProfiler,
 73        /// Opens the onboarding view.
 74        OpenOnboarding,
 75    ]
 76);
 77
 78#[derive(PartialEq, Clone, Copy, Debug, Deserialize, JsonSchema)]
 79#[serde(rename_all = "snake_case")]
 80pub enum ExtensionCategoryFilter {
 81    Themes,
 82    IconThemes,
 83    Languages,
 84    Grammars,
 85    LanguageServers,
 86    ContextServers,
 87    AgentServers,
 88    Snippets,
 89    DebugAdapters,
 90}
 91
 92/// Opens the extensions management interface.
 93#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
 94#[action(namespace = zed)]
 95#[serde(deny_unknown_fields)]
 96pub struct Extensions {
 97    /// Filters the extensions page down to extensions that are in the specified category.
 98    #[serde(default)]
 99    pub category_filter: Option<ExtensionCategoryFilter>,
100    /// Focuses just the extension with the specified ID.
101    #[serde(default)]
102    pub id: Option<String>,
103}
104
105/// Opens the ACP registry.
106#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
107#[action(namespace = zed)]
108#[serde(deny_unknown_fields)]
109pub struct AcpRegistry;
110
111/// Show call diagnostics and connection quality statistics.
112#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
113#[action(namespace = collab)]
114#[serde(deny_unknown_fields)]
115pub struct ShowCallStats;
116
117/// Decreases the font size in the editor buffer.
118#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
119#[action(namespace = zed)]
120#[serde(deny_unknown_fields)]
121pub struct DecreaseBufferFontSize {
122    #[serde(default)]
123    pub persist: bool,
124}
125
126/// Increases the font size in the editor buffer.
127#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
128#[action(namespace = zed)]
129#[serde(deny_unknown_fields)]
130pub struct IncreaseBufferFontSize {
131    #[serde(default)]
132    pub persist: bool,
133}
134
135/// Opens the settings editor at a specific path.
136#[derive(PartialEq, Clone, Debug, Deserialize, JsonSchema, Action)]
137#[action(namespace = zed)]
138#[serde(deny_unknown_fields)]
139pub struct OpenSettingsAt {
140    /// A path to a specific setting (e.g. `theme.mode`)
141    pub path: String,
142}
143
144/// Resets the buffer font size to the default value.
145#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
146#[action(namespace = zed)]
147#[serde(deny_unknown_fields)]
148pub struct ResetBufferFontSize {
149    #[serde(default)]
150    pub persist: bool,
151}
152
153/// Decreases the font size of the user interface.
154#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
155#[action(namespace = zed)]
156#[serde(deny_unknown_fields)]
157pub struct DecreaseUiFontSize {
158    #[serde(default)]
159    pub persist: bool,
160}
161
162/// Increases the font size of the user interface.
163#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
164#[action(namespace = zed)]
165#[serde(deny_unknown_fields)]
166pub struct IncreaseUiFontSize {
167    #[serde(default)]
168    pub persist: bool,
169}
170
171/// Resets the UI font size to the default value.
172#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
173#[action(namespace = zed)]
174#[serde(deny_unknown_fields)]
175pub struct ResetUiFontSize {
176    #[serde(default)]
177    pub persist: bool,
178}
179
180/// Resets all zoom levels (UI and buffer font sizes, including in the agent panel) to their default values.
181#[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
182#[action(namespace = zed)]
183#[serde(deny_unknown_fields)]
184pub struct ResetAllZoom {
185    #[serde(default)]
186    pub persist: bool,
187}
188
189pub mod editor {
190    use gpui::actions;
191    actions!(
192        editor,
193        [
194            /// Moves cursor up.
195            MoveUp,
196            /// Moves cursor down.
197            MoveDown,
198            /// Reveals the current file in the system file manager.
199            RevealInFileManager,
200        ]
201    );
202}
203
204pub mod dev {
205    use gpui::actions;
206
207    actions!(
208        dev,
209        [
210            /// Toggles the developer inspector for debugging UI elements.
211            ToggleInspector
212        ]
213    );
214}
215
216pub mod remote_debug {
217    use gpui::actions;
218
219    actions!(
220        remote_debug,
221        [
222            /// Simulates a disconnection from the remote server for testing purposes.
223            /// This will trigger the reconnection logic.
224            SimulateDisconnect,
225            /// Simulates a timeout/slow connection to the remote server for testing purposes.
226            /// This will cause heartbeat failures and trigger reconnection.
227            SimulateTimeout,
228            /// Simulates a timeout/slow connection to the remote server for testing purposes.
229            /// This will cause heartbeat failures and attempting a reconnection while having exhausted all attempts.
230            SimulateTimeoutExhausted,
231        ]
232    );
233}
234
235pub mod workspace {
236    use gpui::actions;
237
238    actions!(
239        workspace,
240        [
241            #[action(deprecated_aliases = ["editor::CopyPath", "outline_panel::CopyPath", "project_panel::CopyPath"])]
242            CopyPath,
243            #[action(deprecated_aliases = ["editor::CopyRelativePath", "outline_panel::CopyRelativePath", "project_panel::CopyRelativePath"])]
244            CopyRelativePath,
245            /// Opens the selected file with the system's default application.
246            #[action(deprecated_aliases = ["project_panel::OpenWithSystem"])]
247            OpenWithSystem,
248        ]
249    );
250}
251
252pub mod git {
253    use gpui::actions;
254
255    actions!(
256        git,
257        [
258            /// Checks out a different git branch.
259            CheckoutBranch,
260            /// Switches to a different git branch.
261            Switch,
262            /// Selects a different repository.
263            SelectRepo,
264            /// Filter remotes.
265            FilterRemotes,
266            /// Create a git remote.
267            CreateRemote,
268            /// Opens the git branch selector.
269            #[action(deprecated_aliases = ["branches::OpenRecent"])]
270            Branch,
271            /// Opens the git stash selector.
272            ViewStash,
273            /// Opens the git worktree selector.
274            Worktree,
275            /// Creates a pull request for the current branch.
276            CreatePullRequest
277        ]
278    );
279}
280
281pub mod toast {
282    use gpui::actions;
283
284    actions!(
285        toast,
286        [
287            /// Runs the action associated with a toast notification.
288            RunAction
289        ]
290    );
291}
292
293pub mod command_palette {
294    use gpui::actions;
295
296    actions!(
297        command_palette,
298        [
299            /// Toggles the command palette.
300            Toggle,
301        ]
302    );
303}
304
305pub mod project_panel {
306    use gpui::actions;
307
308    actions!(
309        project_panel,
310        [
311            /// Toggles the project panel.
312            Toggle,
313            /// Toggles focus on the project panel.
314            ToggleFocus
315        ]
316    );
317}
318pub mod feedback {
319    use gpui::actions;
320
321    actions!(
322        feedback,
323        [
324            /// Opens email client to send feedback to Zed support.
325            EmailZed,
326            /// Opens the bug report form.
327            FileBugReport,
328            /// Opens the feature request form.
329            RequestFeature
330        ]
331    );
332}
333
334pub mod theme {
335    use gpui::actions;
336
337    actions!(theme, [ToggleMode]);
338}
339
340pub mod theme_selector {
341    use gpui::Action;
342    use schemars::JsonSchema;
343    use serde::Deserialize;
344
345    /// Toggles the theme selector interface.
346    #[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
347    #[action(namespace = theme_selector)]
348    #[serde(deny_unknown_fields)]
349    pub struct Toggle {
350        /// A list of theme names to filter the theme selector down to.
351        pub themes_filter: Option<Vec<String>>,
352    }
353}
354
355pub mod icon_theme_selector {
356    use gpui::Action;
357    use schemars::JsonSchema;
358    use serde::Deserialize;
359
360    /// Toggles the icon theme selector interface.
361    #[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
362    #[action(namespace = icon_theme_selector)]
363    #[serde(deny_unknown_fields)]
364    pub struct Toggle {
365        /// A list of icon theme names to filter the theme selector down to.
366        pub themes_filter: Option<Vec<String>>,
367    }
368}
369
370pub mod search {
371    use gpui::actions;
372    actions!(
373        search,
374        [
375            /// Toggles searching in ignored files.
376            ToggleIncludeIgnored
377        ]
378    );
379}
380pub mod buffer_search {
381    use gpui::{Action, actions};
382    use schemars::JsonSchema;
383    use serde::Deserialize;
384
385    /// Opens the buffer search interface with the specified configuration.
386    #[derive(PartialEq, Clone, Deserialize, JsonSchema, Action)]
387    #[action(namespace = buffer_search)]
388    #[serde(deny_unknown_fields)]
389    pub struct Deploy {
390        #[serde(default = "util::serde::default_true")]
391        pub focus: bool,
392        #[serde(default)]
393        pub replace_enabled: bool,
394        #[serde(default)]
395        pub selection_search_enabled: bool,
396    }
397
398    impl Deploy {
399        pub fn find() -> Self {
400            Self {
401                focus: true,
402                replace_enabled: false,
403                selection_search_enabled: false,
404            }
405        }
406
407        pub fn replace() -> Self {
408            Self {
409                focus: true,
410                replace_enabled: true,
411                selection_search_enabled: false,
412            }
413        }
414    }
415
416    actions!(
417        buffer_search,
418        [
419            /// Deploys the search and replace interface.
420            DeployReplace,
421            /// Dismisses the search bar.
422            Dismiss,
423            /// Focuses back on the editor.
424            FocusEditor
425        ]
426    );
427}
428pub mod settings_profile_selector {
429    use gpui::Action;
430    use schemars::JsonSchema;
431    use serde::Deserialize;
432
433    #[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
434    #[action(namespace = settings_profile_selector)]
435    pub struct Toggle;
436}
437
438pub mod agent {
439    use gpui::{Action, SharedString, actions};
440    use schemars::JsonSchema;
441    use serde::Deserialize;
442
443    actions!(
444        agent,
445        [
446            /// Opens the agent settings panel.
447            #[action(deprecated_aliases = ["agent::OpenConfiguration"])]
448            OpenSettings,
449            /// Opens the agent onboarding modal.
450            OpenOnboardingModal,
451            /// Opens the ACP onboarding modal.
452            OpenAcpOnboardingModal,
453            /// Resets the agent onboarding state.
454            ResetOnboarding,
455            /// Starts a chat conversation with the agent.
456            Chat,
457            /// Toggles the language model selector dropdown.
458            #[action(deprecated_aliases = ["assistant::ToggleModelSelector", "assistant2::ToggleModelSelector"])]
459            ToggleModelSelector,
460            /// Triggers re-authentication on Gemini
461            ReauthenticateAgent,
462            /// Add the current selection as context for threads in the agent panel.
463            #[action(deprecated_aliases = ["assistant::QuoteSelection", "agent::QuoteSelection"])]
464            AddSelectionToThread,
465            /// Resets the agent panel zoom levels (agent UI and buffer font sizes).
466            ResetAgentZoom,
467            /// Pastes clipboard content without any formatting.
468            PasteRaw,
469        ]
470    );
471
472    /// Opens a new agent thread with the provided branch diff for review.
473    #[derive(Clone, PartialEq, Deserialize, JsonSchema, Action)]
474    #[action(namespace = agent)]
475    #[serde(deny_unknown_fields)]
476    pub struct ReviewBranchDiff {
477        /// The full text of the diff to review.
478        pub diff_text: SharedString,
479        /// The base ref that the diff was computed against (e.g. "main").
480        pub base_ref: SharedString,
481    }
482
483    /// A single merge conflict region extracted from a file.
484    #[derive(Clone, Debug, PartialEq, Deserialize, JsonSchema)]
485    pub struct ConflictContent {
486        pub file_path: String,
487        pub conflict_text: String,
488        pub ours_branch_name: String,
489        pub theirs_branch_name: String,
490    }
491
492    /// Opens a new agent thread to resolve specific merge conflicts.
493    #[derive(Clone, PartialEq, Deserialize, JsonSchema, Action)]
494    #[action(namespace = agent)]
495    #[serde(deny_unknown_fields)]
496    pub struct ResolveConflictsWithAgent {
497        /// Individual conflicts with their full text.
498        pub conflicts: Vec<ConflictContent>,
499    }
500
501    /// Opens a new agent thread to resolve merge conflicts in the given file paths.
502    #[derive(Clone, PartialEq, Deserialize, JsonSchema, Action)]
503    #[action(namespace = agent)]
504    #[serde(deny_unknown_fields)]
505    pub struct ResolveConflictedFilesWithAgent {
506        /// File paths with unresolved conflicts (for project-wide resolution).
507        pub conflicted_file_paths: Vec<String>,
508    }
509}
510
511pub mod assistant {
512    use gpui::{Action, actions};
513    use schemars::JsonSchema;
514    use serde::Deserialize;
515    use uuid::Uuid;
516
517    actions!(
518        agent,
519        [
520            /// Toggles the agent panel.
521            Toggle,
522            #[action(deprecated_aliases = ["assistant::ToggleFocus"])]
523            ToggleFocus
524        ]
525    );
526
527    /// Opens the rules library for managing agent rules and prompts.
528    #[derive(PartialEq, Clone, Default, Debug, Deserialize, JsonSchema, Action)]
529    #[action(namespace = agent, deprecated_aliases = ["assistant::OpenRulesLibrary", "assistant::DeployPromptLibrary"])]
530    #[serde(deny_unknown_fields)]
531    pub struct OpenRulesLibrary {
532        #[serde(skip)]
533        pub prompt_to_select: Option<Uuid>,
534    }
535
536    /// Deploys the assistant interface with the specified configuration.
537    #[derive(Clone, Default, Deserialize, PartialEq, JsonSchema, Action)]
538    #[action(namespace = assistant)]
539    #[serde(deny_unknown_fields)]
540    pub struct InlineAssist {
541        pub prompt: Option<String>,
542    }
543}
544
545/// Opens the recent projects interface.
546#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
547#[action(namespace = projects)]
548#[serde(deny_unknown_fields)]
549pub struct OpenRecent {
550    #[serde(default)]
551    pub create_new_window: bool,
552}
553
554/// Creates a project from a selected template.
555#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
556#[action(namespace = projects)]
557#[serde(deny_unknown_fields)]
558pub struct OpenRemote {
559    #[serde(default)]
560    pub from_existing_connection: bool,
561    #[serde(default)]
562    pub create_new_window: bool,
563}
564
565/// Opens the dev container connection modal.
566#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
567#[action(namespace = projects)]
568#[serde(deny_unknown_fields)]
569pub struct OpenDevContainer;
570
571/// Where to spawn the task in the UI.
572#[derive(Default, Clone, Copy, Debug, PartialEq, Eq, Serialize, Deserialize, JsonSchema)]
573#[serde(rename_all = "snake_case")]
574pub enum RevealTarget {
575    /// In the central pane group, "main" editor area.
576    Center,
577    /// In the terminal dock, "regular" terminal items' place.
578    #[default]
579    Dock,
580}
581
582/// Spawns a task with name or opens tasks modal.
583#[derive(Debug, PartialEq, Clone, Deserialize, JsonSchema, Action)]
584#[action(namespace = task)]
585#[serde(untagged)]
586pub enum Spawn {
587    /// Spawns a task by the name given.
588    ByName {
589        task_name: String,
590        #[serde(default)]
591        reveal_target: Option<RevealTarget>,
592    },
593    /// Spawns a task by the tag given.
594    ByTag {
595        task_tag: String,
596        #[serde(default)]
597        reveal_target: Option<RevealTarget>,
598    },
599    /// Spawns a task via modal's selection.
600    ViaModal {
601        /// Selected task's `reveal_target` property override.
602        #[serde(default)]
603        reveal_target: Option<RevealTarget>,
604    },
605}
606
607impl Spawn {
608    pub fn modal() -> Self {
609        Self::ViaModal {
610            reveal_target: None,
611        }
612    }
613}
614
615/// Reruns the last task.
616#[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
617#[action(namespace = task)]
618#[serde(deny_unknown_fields)]
619pub struct Rerun {
620    /// Controls whether the task context is reevaluated prior to execution of a task.
621    /// If it is not, environment variables such as ZED_COLUMN, ZED_FILE are gonna be the same as in the last execution of a task
622    /// If it is, these variables will be updated to reflect current state of editor at the time task::Rerun is executed.
623    /// default: false
624    #[serde(default)]
625    pub reevaluate_context: bool,
626    /// Overrides `allow_concurrent_runs` property of the task being reran.
627    /// Default: null
628    #[serde(default)]
629    pub allow_concurrent_runs: Option<bool>,
630    /// Overrides `use_new_terminal` property of the task being reran.
631    /// Default: null
632    #[serde(default)]
633    pub use_new_terminal: Option<bool>,
634
635    /// If present, rerun the task with this ID, otherwise rerun the last task.
636    #[serde(skip)]
637    pub task_id: Option<String>,
638}
639
640pub mod outline {
641    use std::sync::OnceLock;
642
643    use gpui::{AnyView, App, Window, actions};
644
645    actions!(
646        outline,
647        [
648            #[action(name = "Toggle")]
649            ToggleOutline
650        ]
651    );
652    /// A pointer to outline::toggle function, exposed here to sewer the breadcrumbs <-> outline dependency.
653    pub static TOGGLE_OUTLINE: OnceLock<fn(AnyView, &mut Window, &mut App)> = OnceLock::new();
654}
655
656actions!(
657    zed_predict_onboarding,
658    [
659        /// Opens the Zed Predict onboarding modal.
660        OpenZedPredictOnboarding
661    ]
662);
663actions!(
664    git_onboarding,
665    [
666        /// Opens the git integration onboarding modal.
667        OpenGitIntegrationOnboarding
668    ]
669);
670
671pub mod debug_panel {
672    use gpui::actions;
673    actions!(
674        debug_panel,
675        [
676            /// Toggles the debug panel.
677            Toggle,
678            /// Toggles focus on the debug panel.
679            ToggleFocus
680        ]
681    );
682}
683
684actions!(
685    debugger,
686    [
687        /// Toggles the enabled state of a breakpoint.
688        ToggleEnableBreakpoint,
689        /// Removes a breakpoint.
690        UnsetBreakpoint,
691        /// Opens the project debug tasks configuration.
692        OpenProjectDebugTasks,
693    ]
694);
695
696pub mod vim {
697    use gpui::actions;
698
699    actions!(
700        vim,
701        [
702            /// Opens the default keymap file.
703            OpenDefaultKeymap
704        ]
705    );
706}
707
708#[derive(Debug, Clone, PartialEq, Eq, Hash)]
709pub struct WslConnectionOptions {
710    pub distro_name: String,
711    pub user: Option<String>,
712}
713
714#[cfg(target_os = "windows")]
715pub mod wsl_actions {
716    use gpui::Action;
717    use schemars::JsonSchema;
718    use serde::Deserialize;
719
720    /// Opens a folder inside Wsl.
721    #[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
722    #[action(namespace = projects)]
723    #[serde(deny_unknown_fields)]
724    pub struct OpenFolderInWsl {
725        #[serde(default)]
726        pub create_new_window: bool,
727    }
728
729    /// Open a wsl distro.
730    #[derive(PartialEq, Clone, Deserialize, Default, JsonSchema, Action)]
731    #[action(namespace = projects)]
732    #[serde(deny_unknown_fields)]
733    pub struct OpenWsl {
734        #[serde(default)]
735        pub create_new_window: bool,
736    }
737}
738
739pub mod preview {
740    pub mod markdown {
741        use gpui::actions;
742
743        actions!(
744            markdown,
745            [
746                /// Opens a markdown preview for the current file.
747                OpenPreview,
748                /// Opens a markdown preview in a split pane.
749                OpenPreviewToTheSide,
750            ]
751        );
752    }
753
754    pub mod svg {
755        use gpui::actions;
756
757        actions!(
758            svg,
759            [
760                /// Opens an SVG preview for the current file.
761                OpenPreview,
762                /// Opens an SVG preview in a split pane.
763                OpenPreviewToTheSide,
764            ]
765        );
766    }
767}
768
769pub mod agents_sidebar {
770    use gpui::{Action, actions};
771    use schemars::JsonSchema;
772    use serde::Deserialize;
773
774    /// Toggles the thread switcher popup when the sidebar is focused.
775    #[derive(PartialEq, Clone, Deserialize, JsonSchema, Default, Action)]
776    #[action(namespace = agents_sidebar)]
777    #[serde(deny_unknown_fields)]
778    pub struct ToggleThreadSwitcher {
779        #[serde(default)]
780        pub select_last: bool,
781    }
782
783    actions!(
784        agents_sidebar,
785        [
786            /// Moves focus to the sidebar's search/filter editor.
787            FocusSidebarFilter,
788        ]
789    );
790}
791
792pub mod notebook {
793    use gpui::actions;
794
795    actions!(
796        notebook,
797        [
798            /// Opens a Jupyter notebook file.
799            OpenNotebook,
800            /// Runs all cells in the notebook.
801            RunAll,
802            /// Runs the current cell and stays on it.
803            Run,
804            /// Runs the current cell and advances to the next cell.
805            RunAndAdvance,
806            /// Clears all cell outputs.
807            ClearOutputs,
808            /// Moves the current cell up.
809            MoveCellUp,
810            /// Moves the current cell down.
811            MoveCellDown,
812            /// Adds a new markdown cell.
813            AddMarkdownBlock,
814            /// Adds a new code cell.
815            AddCodeBlock,
816            /// Restarts the kernel.
817            RestartKernel,
818            /// Interrupts the current execution.
819            InterruptKernel,
820            /// Move down in cells.
821            NotebookMoveDown,
822            /// Move up in cells.
823            NotebookMoveUp,
824            /// Enters the current cell's editor (edit mode).
825            EnterEditMode,
826            /// Exits the cell editor and returns to cell command mode.
827            EnterCommandMode,
828        ]
829    );
830}