diff options
| author | Aram Drevekenin <aram@poor.dev> | 2026-02-10 10:42:46 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-10 10:42:46 +0100 |
| commit | 860e8e323a0d9b94280e1e25d0c626ff5bc03687 (patch) | |
| tree | 53b7bdccd075f93e93a7d93d8bb79878061aa000 /zellij-utils/src/plugin_api/plugin_command.proto | |
| parent | chore: Fix the issue template to match existing labels (#4637) (diff) | |
| download | sl0ppij-860e8e323a0d9b94280e1e25d0c626ff5bc03687.tar.gz sl0ppij-860e8e323a0d9b94280e1e25d0c626ff5bc03687.tar.xz sl0ppij-860e8e323a0d9b94280e1e25d0c626ff5bc03687.zip | |
Improve plugin API ergonomics and add CLI goodies (#4690)
* return created tab_id from relevant plugin API methods
* add to cli
* return Option<PaneId> in plugin API methods that create panes
* return created pane_id in cli for relevant actions
* allow plugins to query for pane_info based on pane_id
* allow plugins to query for TabInfo by its id
* allow plugins to query pane command/cwd synchronously
* zellij action list-panes
* style and formatting
* fix e2e tests
* add pr
Diffstat (limited to 'zellij-utils/src/plugin_api/plugin_command.proto')
| -rw-r--r-- | zellij-utils/src/plugin_api/plugin_command.proto | 158 |
1 files changed, 158 insertions, 0 deletions
diff --git a/zellij-utils/src/plugin_api/plugin_command.proto b/zellij-utils/src/plugin_api/plugin_command.proto index 6ef1ad34..b450c13f 100644 --- a/zellij-utils/src/plugin_api/plugin_command.proto +++ b/zellij-utils/src/plugin_api/plugin_command.proto @@ -180,6 +180,10 @@ enum CommandName { SetPaneBorderless = 185; SaveSession = 186; CurrentSessionLastSavedTime = 187; + GetPaneInfo = 188; + GetTabInfo = 189; + GetPaneRunningCommand = 190; + GetPaneCwd = 191; } message PluginCommand { @@ -309,6 +313,10 @@ message PluginCommand { SetPaneBorderlessPayload set_pane_borderless_payload = 136; SaveSessionPayload save_session_payload = 137; CurrentSessionLastSavedTimePayload current_session_last_saved_time_payload = 138; + GetPaneInfoPayload get_pane_info_payload = 139; + GetTabInfoPayload get_tab_info_payload = 140; + GetPaneRunningCommandPayload get_pane_running_command_payload = 141; + GetPaneCwdPayload get_pane_cwd_payload = 142; } } @@ -799,6 +807,32 @@ message GetPanePidResponse { } } +message GetPaneRunningCommandPayload { + PaneId pane_id = 1; +} + +message GetPaneRunningCommandResponse { + oneof result { + RunningCommand command = 1; + string error = 2; + } +} + +message RunningCommand { + repeated string args = 1; +} + +message GetPaneCwdPayload { + PaneId pane_id = 1; +} + +message GetPaneCwdResponse { + oneof result { + string cwd = 1; + string error = 2; + } +} + message SaveLayoutResponse { oneof result { bool success = 1; @@ -925,3 +959,127 @@ message CurrentSessionLastSavedTimePayload {} message CurrentSessionLastSavedTimeResponse { optional uint64 timestamp_millis = 1; // None if never saved, otherwise milliseconds elapsed since last save } + +message GetPaneInfoPayload { + PaneId pane_id = 1; +} + +message GetPaneInfoResponse { + optional event.PaneInfo pane_info = 1; // None if pane not found +} + +message GetTabInfoPayload { + uint64 tab_id = 1; +} + +message GetTabInfoResponse { + optional event.TabInfo tab_info = 1; // None if tab not found +} + +message NewTabResponse { + oneof result { + uint64 tab_id = 1; + bool none = 2; // Indicates None + } +} + +message NewTabsResponse { + repeated uint64 tab_ids = 1; // Only includes successfully created tabs +} + +message FocusOrCreateTabResponse { + oneof result { + uint64 tab_id = 1; + bool none = 2; // Indicates None + } +} + +message BreakPanesToNewTabResponse { + oneof result { + uint64 tab_id = 1; + bool none = 2; // Indicates None + } +} + +message BreakPanesToTabWithIndexResponse { + oneof result { + uint64 tab_id = 1; + bool none = 2; // Indicates None + } +} + +message OpenFileResponse { + optional PaneId pane_id = 1; +} + +message OpenFileFloatingResponse { + optional PaneId pane_id = 1; +} + +message OpenFileInPlaceResponse { + optional PaneId pane_id = 1; +} + +message OpenFileNearPluginResponse { + optional PaneId pane_id = 1; +} + +message OpenFileFloatingNearPluginResponse { + optional PaneId pane_id = 1; +} + +message OpenFileInPlaceOfPluginResponse { + optional PaneId pane_id = 1; +} + +message OpenTerminalResponse { + optional PaneId pane_id = 1; +} + +message OpenTerminalFloatingResponse { + optional PaneId pane_id = 1; +} + +message OpenTerminalInPlaceResponse { + optional PaneId pane_id = 1; +} + +message OpenTerminalNearPluginResponse { + optional PaneId pane_id = 1; +} + +message OpenTerminalFloatingNearPluginResponse { + optional PaneId pane_id = 1; +} + +message OpenTerminalInPlaceOfPluginResponse { + optional PaneId pane_id = 1; +} + +message OpenCommandPaneResponse { + optional PaneId pane_id = 1; +} + +message OpenCommandPaneFloatingResponse { + optional PaneId pane_id = 1; +} + +message OpenCommandPaneInPlaceResponse { + optional PaneId pane_id = 1; +} + +message OpenCommandPaneNearPluginResponse { + optional PaneId pane_id = 1; +} + +message OpenCommandPaneFloatingNearPluginResponse { + optional PaneId pane_id = 1; +} + +message OpenCommandPaneInPlaceOfPluginResponse { + optional PaneId pane_id = 1; +} + +message OpenCommandPaneBackgroundResponse { + optional PaneId pane_id = 1; +} |
