diff options
| author | Aram Drevekenin <aram@poor.dev> | 2024-03-18 09:19:58 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-18 09:19:58 +0100 |
| commit | ee16a4b8c347a81878389fd4f90144c2c6357f41 (patch) | |
| tree | bf8675d57499b6278e8c89b84c8141969cc2ce3f /zellij-utils/src/plugin_api/plugin_command.rs | |
| parent | docs(changelog): switch session cwd (diff) | |
| download | sl0ppij-ee16a4b8c347a81878389fd4f90144c2c6357f41.tar.gz sl0ppij-ee16a4b8c347a81878389fd4f90144c2c6357f41.tar.xz sl0ppij-ee16a4b8c347a81878389fd4f90144c2c6357f41.zip | |
feat(plugins): session manager cwd and new filepicker (#3200)
* prototype
* folder selection ui in session manager
* overhaul strider
* scan folder host command
* get strider to work from the cli and some cli pipe fixes
* some ux improvements to strider
* improve strider's ui
* make strider ui responsive
* make session-manager new ui parts responsive
* fix tests
* 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 | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/zellij-utils/src/plugin_api/plugin_command.rs b/zellij-utils/src/plugin_api/plugin_command.rs index ab9d5294..e452e53c 100644 --- a/zellij-utils/src/plugin_api/plugin_command.rs +++ b/zellij-utils/src/plugin_api/plugin_command.rs @@ -855,7 +855,17 @@ impl TryFrom<ProtobufPluginCommand> for PluginCommand { Some(Payload::KillSessionsPayload(KillSessionsPayload { session_names })) => { Ok(PluginCommand::KillSessions(session_names)) }, - _ => Err("Mismatched payload for PipeOutput"), + _ => Err("Mismatched payload for KillSessions"), + }, + Some(CommandName::ScanHostFolder) => match protobuf_plugin_command.payload { + Some(Payload::ScanHostFolderPayload(folder_to_scan)) => { + Ok(PluginCommand::ScanHostFolder(PathBuf::from(folder_to_scan))) + }, + _ => Err("Mismatched payload for ScanHostFolder"), + }, + Some(CommandName::WatchFilesystem) => match protobuf_plugin_command.payload { + Some(_) => Err("WatchFilesystem should have no payload, found a payload"), + None => Ok(PluginCommand::WatchFilesystem), }, None => Err("Unrecognized plugin command"), } @@ -1361,6 +1371,16 @@ impl TryFrom<PluginCommand> for ProtobufPluginCommand { session_names, })), }), + PluginCommand::ScanHostFolder(folder_to_scan) => Ok(ProtobufPluginCommand { + name: CommandName::ScanHostFolder as i32, + payload: Some(Payload::ScanHostFolderPayload( + folder_to_scan.display().to_string(), + )), + }), + PluginCommand::WatchFilesystem => Ok(ProtobufPluginCommand { + name: CommandName::WatchFilesystem as i32, + payload: None, + }), } } } |
