diff options
| author | Aram Drevekenin <aram@poor.dev> | 2023-11-04 11:20:50 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-04 11:20:50 +0100 |
| commit | 4c6b03acc16c968663d2875556aae25ef6dac87c (patch) | |
| tree | 679530bd592cd7e5bfcedbc4e3f49708618b4886 /zellij-utils/src/plugin_api/plugin_command.rs | |
| parent | docs(changelog): load plugins from the web (diff) | |
| download | sl0ppij-4c6b03acc16c968663d2875556aae25ef6dac87c.tar.gz sl0ppij-4c6b03acc16c968663d2875556aae25ef6dac87c.tar.xz sl0ppij-4c6b03acc16c968663d2875556aae25ef6dac87c.zip | |
feat(sessions): resurrect sessions through the session-manager (and plugin API) (#2902)
* working with table and scrolling
* ui and functionality complete
* fix formatting
* refactor: background jobs
* style(fmt): rustfmt
Diffstat (limited to 'zellij-utils/src/plugin_api/plugin_command.rs')
| -rw-r--r-- | zellij-utils/src/plugin_api/plugin_command.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/zellij-utils/src/plugin_api/plugin_command.rs b/zellij-utils/src/plugin_api/plugin_command.rs index 84c083ad..6b70b18e 100644 --- a/zellij-utils/src/plugin_api/plugin_command.rs +++ b/zellij-utils/src/plugin_api/plugin_command.rs @@ -628,6 +628,13 @@ impl TryFrom<ProtobufPluginCommand> for PluginCommand { }, _ => Err("Mismatched payload for WebRequest"), }, + Some(CommandName::DeleteDeadSession) => match protobuf_plugin_command.payload { + Some(Payload::DeleteDeadSessionPayload(dead_session_name)) => { + Ok(PluginCommand::DeleteDeadSession(dead_session_name)) + }, + _ => Err("Mismatched payload for DeleteDeadSession"), + }, + Some(CommandName::DeleteAllDeadSessions) => Ok(PluginCommand::DeleteAllDeadSessions), None => Err("Unrecognized plugin command"), } } @@ -1044,6 +1051,14 @@ impl TryFrom<PluginCommand> for ProtobufPluginCommand { })), }) }, + PluginCommand::DeleteDeadSession(dead_session_name) => Ok(ProtobufPluginCommand { + name: CommandName::DeleteDeadSession as i32, + payload: Some(Payload::DeleteDeadSessionPayload(dead_session_name)), + }), + PluginCommand::DeleteAllDeadSessions => Ok(ProtobufPluginCommand { + name: CommandName::DeleteAllDeadSessions as i32, + payload: None, + }), } } } |
