aboutsummaryrefslogtreecommitdiffstats
path: root/zellij-utils/src/ipc/protobuf_conversion.rs
diff options
context:
space:
mode:
authorAram Drevekenin <aram@poor.dev>2026-02-17 15:43:28 +0100
committerGitHub <noreply@github.com>2026-02-17 15:43:28 +0100
commit4e66a0beff5e41bda1dbde521fa1d2858c46fe7b (patch)
tree380bee5eeac56bea2ebf341cccbe69615585e394 /zellij-utils/src/ipc/protobuf_conversion.rs
parentFix startup message and cache file creation (#4705) (diff)
downloadsl0ppij-4e66a0beff5e41bda1dbde521fa1d2858c46fe7b.tar.gz
sl0ppij-4e66a0beff5e41bda1dbde521fa1d2858c46fe7b.tar.xz
sl0ppij-4e66a0beff5e41bda1dbde521fa1d2858c46fe7b.zip
Revamp the sequence plugin (#4713)
* initial pipe interface * initial open_x_pane_in_new_tab plugin api implementation * fix: send CommandPaneExited for command panes opened as initial_terminals in new tabs from plugins * open panes in place of specific pane id plugin commands - initial implementation * sequence and plugin api ux * focus self when starting * combine ui and pipe paths * highlight selected pane * initial sequence removal of editing capabilities * fix: translate plugin paths in api * properly trim commands when loaded from pipe or pasted text * minor ux fixes * get ctrl c to work properly * behavior fixes * more ui fixes * fix tests * close tab and end sequence properly * default to AND * zellij sequence alias * add alias * consolidate paths * rustfmt * fix ui padding * add pr * fix: reset scrolling when resetting terminal state
Diffstat (limited to 'zellij-utils/src/ipc/protobuf_conversion.rs')
-rw-r--r--zellij-utils/src/ipc/protobuf_conversion.rs15
1 files changed, 15 insertions, 0 deletions
diff --git a/zellij-utils/src/ipc/protobuf_conversion.rs b/zellij-utils/src/ipc/protobuf_conversion.rs
index 656be5db..023e0503 100644
--- a/zellij-utils/src/ipc/protobuf_conversion.rs
+++ b/zellij-utils/src/ipc/protobuf_conversion.rs
@@ -3276,6 +3276,7 @@ impl From<crate::data::CommandOrPlugin>
{
fn from(cmd_or_plugin: crate::data::CommandOrPlugin) -> Self {
use crate::client_server_contract::client_server_contract::command_or_plugin::CommandOrPluginType;
+ use crate::client_server_contract::client_server_contract::CommandOrPluginFile;
match cmd_or_plugin {
crate::data::CommandOrPlugin::Command(cmd) => Self {
command_or_plugin_type: Some(CommandOrPluginType::Command(cmd.into())),
@@ -3283,6 +3284,13 @@ impl From<crate::data::CommandOrPlugin>
crate::data::CommandOrPlugin::Plugin(plugin) => Self {
command_or_plugin_type: Some(CommandOrPluginType::Plugin(plugin.into())),
},
+ crate::data::CommandOrPlugin::File(f) => Self {
+ command_or_plugin_type: Some(CommandOrPluginType::File(CommandOrPluginFile {
+ path: f.path.display().to_string(),
+ line_number: f.line_number.map(|n| n as i32),
+ cwd: f.cwd.map(|c| c.display().to_string()),
+ })),
+ },
}
}
}
@@ -3307,6 +3315,13 @@ impl TryFrom<crate::client_server_contract::client_server_contract::CommandOrPlu
CommandOrPluginType::Plugin(plugin) => {
Ok(crate::data::CommandOrPlugin::Plugin(plugin.try_into()?))
},
+ CommandOrPluginType::File(f) => Ok(crate::data::CommandOrPlugin::File(
+ crate::data::FileToOpen {
+ path: std::path::PathBuf::from(&f.path),
+ line_number: f.line_number.map(|n| n as usize),
+ cwd: f.cwd.map(std::path::PathBuf::from),
+ },
+ )),
}
}
}