diff options
author | Aram Drevekenin <aram@poor.dev> | 2023-04-19 10:09:39 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-19 10:09:39 +0200 |
commit | caaee30179cf8e3d20ad103b898e4bad9ebf648b (patch) | |
tree | 6348896d80031befd553d71340e99c02f8f0d078 /zellij-server/src/route.rs | |
parent | 26fcf8470295f0ce37f70d0f7bdd557296f88539 (diff) |
feat(plugins): reload plugin at runtime (#2372)
* fix(plugins): proper error when wasm file does not exist
* reload working
* race condition handling
* refactor(plugins): start plugin
* refactor(plugins): plugin-loader
* refactor(plugins): load/reload plugin
* refactor(plugins): apply cached events
* fix(plugins): gittery loading
* chore(plugins): rename reload-plugin to start-or-reload-plugin
* chore(styling): small cleanups
* style(fmt): rustfmt
* style(fmt): cleanups
* style(fmt): cleanups
* test(e2e): update snapshots
* test(e2e): update snapshots
* chore(repo): comment plugin optimization because it doubles the CI time
Diffstat (limited to 'zellij-server/src/route.rs')
-rw-r--r-- | zellij-server/src/route.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/zellij-server/src/route.rs b/zellij-server/src/route.rs index c14d0c14e..cf56a3b13 100644 --- a/zellij-server/src/route.rs +++ b/zellij-server/src/route.rs @@ -16,6 +16,7 @@ use zellij_utils::{ actions::{Action, SearchDirection, SearchOption}, command::TerminalAction, get_mode_info, + layout::RunPluginLocation, }, ipc::{ClientToServerMsg, ExitReason, IpcReceiverWithContext, ServerToClientMsg}, }; @@ -690,6 +691,18 @@ pub(crate) fn route_action( )) .with_context(err_context)?; }, + Action::StartOrReloadPlugin(url) => { + let run_plugin_location = + RunPluginLocation::parse(url.as_str()).with_context(err_context)?; + session + .senders + .send_to_screen(ScreenInstruction::StartOrReloadPluginPane( + run_plugin_location, + None, + client_id, + )) + .with_context(err_context)?; + }, } Ok(should_break) } |